Without much luck, I solved my own problems by using get_transient(...) and set_transient(...)
Note, this is a wordpress-only fix. and I still makes the first call the query the one who has to suffer.
In my case, it was acceptable since I am fine with storing the result for the entire day. Even 12 hours is fine for me. I'm still looking for answers to the ...
Can I exclude a post by meta key using pre_get_posts function? // setting meta in pre_get_posts
Query all posts where a meta key does not exist // exists & not exists formatting
multiple orderby in pre_get_posts action // how to set multiple ordeby
you could perhaps try something like this in your pre_get_posts filter,
//Get original meta ...
The difference is what is returned.
The WPDB query() method returns true for CREATE, ALTER, TRUNCATE and DROP queries, an integer of how many results for all other queries, or simply false if if there's an error.
The WPDB get_results() method actually returns the entire result of the query (like you would get running the query in phpMyAdmin). You can ...