Home

Geeklog: What I Learnt Today / Adam

trying to figure out why wordpress doing so many database queries

> Was trying to figure out why a Wordpress site was doing so many database queries (22 - 28). Wondered if I was doing a query inside a loop or some such silliness.
Found this plugin (very WordPress that: have problem apply more plugins) its actually quite good lists all the queries that your site is doing on each page. Sticks a debug box in the bottom with a list of queries and their content. Its at http://wordpress.org/extend/plugins/debug-queries/
Neatly, It wasn't a dumb mistake by me (yay!) so I'll fiddle with cachegrind see if anything could do with tweaking.

/ Adam