Tagged
Databases
The N+1 you cannot see
Everyone knows to eager load. The queries that actually take sites down are the ones hiding in an accessor, a Blade partial, or a policy — and there is a one-line switch that finds all of them.
Database indexes, explained with a phone book
Most slow queries are one index away from being fast. The reason people do not add it is that nobody ever explained what the index is actually doing.
WP_Query is fast until it is not
WordPress will happily let you write a query that scans a million meta rows. Here is which arguments are expensive, why, and what to do instead.