php - How to cache/speed Wordpress queries for logged in users? -


wordpress generates awful lot of sql queries.

we used 'wp fastest cache' creates static html pages platform , caches them. howevr logged in users, static pages wont work.

here seeing. 122 queries, 7.8s spent in db time! can see queries pretty fast (~0.05s). hence caching queries not going help

enter image description here

i using bluehost deploy , mysql db.

whats best way optimize this. there way run queries in parallel on mysql or other elegant solution?

i thinking of building on heroku using rails, dont have enough time have figure out way optimize db.

moreover can see queries pretty fast

those queries aren't fast. 0.1s simple lookup on options table slow.

all of queries in image posted on options table. i'm not sure if of queries option queries or not, if want reduce total number of option queries, can use autoload parameter on update_option or add_option. documentation:

$autoload
(string) (optional) should option automatically loaded function wp_load_alloptions() (puts options object cache on each page load)? valid values: yes or no.

if autoload options fetched in single query. reduce total number of queries, mentioned before, queries shouldn't taking long begin with.

for existing options, have delete them first , re-add them using autoload parameter:

$val = get_option('some_option'); delete_option('some_option'); update_option('some_option', $val, true); 

by default, when create options set autoload bit odd have many options aren't autoloading.


Comments