SQLite3 in php — some notes

I’ve been working on the SQLIite Object Cache plugin for WordPress, so I’ve had to figure out a few things about using SQLite itself and php’s SQLite3 extension. Here are some notes. There are various versions of the SQLite software around. If you will run your code on multiple different hosting providers and server configurations, … Read more

Database Keys in Scalability Pro

Scalability Pro is a paid plugin for improving backend WordPress and WooCommerce performance. It does multiple things including query rewriting and memoization caching of some time-consuming database queries. One thing it does is add keys (indexes) to some WordPress tables. This article is a table-by-table analysis of some keys it adds, compared with the keys … Read more

WooCommerce key improvement

WordPress’s WooCommerce plugin uses a table called wp_woocommerce_order_itemmeta as an extensible key-value storage mechanism for order line items. Its parent table is wp_woocommerce_order_items. These two tables work similarly to wp_postmeta and wp_posts, and have the same performance issues. In large sites with a long history of orders, lookup may be slow. This DDL, usable only … Read more

Slow searching for WooCommerce orders

Background WooCommerce offers a search box on the WooCommerce -> Orders page. It lets a shop manager search orders, current and historic, for the customer’s name, address, email, and other data. It also searches the names of products and shows orders containing those products. On large sites with many orders, the search is astoundingly slow. … Read more

SQL_CALC_FOUND_ROWS in WordPress

Background When presenting so-called “archive” pages of content to users WordPress uses the notorious SQL_CALC_FOUND_ROWS MySQL extension to populate its display that looks something like this. This kind of user interface is known as “pagination” because it lets the user select pages of results. So, it’s really useful. The phrase “Showing 1-12 of 1348 results” … Read more

Counter

Here’s a way to put a counter that updates once a second in a page. It’s based on the time. This isn’t some earth-shattering discovery, it’s trival. But somebody asked me. 123 is the count now!

Stupid credit bureau tricks

Today I tried to create an account at the web site for the Experian credit bureau. I followed the instructions to the letter. On the second screen of the signup form when I pushed Submit, I got a message saying “An error occurred. Please try again.” No explanation. Nothing saying “we need your zip code” … Read more

Slow WordPress Queries

Index WP MySQL For Speed, the WordPress plugin, allows users to monitor their MariaDB or MySQL database traffic and upload the results of those monitors. It gathers information about the queries, including how long they take and how many there are. Analyzing the uploaded monitor data allows me to identify the most frequent queries and … Read more

Solar Panels for Central Congregational Church

Since last fall (fall 2022) Ollie Jones has been working on a project to get solar panels on the roof of Central Congregational Church. This is an explanation of the project, with some questions and answers. The proposal: to authorize the reinvestment of up to $70,000 of the church’s endowment fund to build this solar-panel … Read more