General speaking yes for read-only applications (until MySQL 5.7, it's deprecated since version 8.0), it enables equal SELECTs to return data extremely fast if identical calls are already stored in cache. You should consider that:
Only exact same clauses can benefit from the cache engine (no spaces, no comments, no actual differences in WHERE expressions);
It is likely there are very few rows WHERE
AND ( wp_posts.post_date >= '2019-09-04 21:45:00' )
there are likely many thousands of rows WHERE
AND ( wp_posts.post_date < '2019-09-04 21:45:00' )
and a table scan is required. EXPLAIN SELECT SQL_NO_CACHE remainder of query for each and examine results carefully.
The post thumbnail is not stored as a URL. The post thumbnail is stored as the attachment ID in the _thumbnail_id post meta. The actual file is stored as the _wp_attached_file post meta for that attachment post. WordPress does not store the full URL for attachments in the database. It only stores the path to the file, relative to the uploads directory.
You'll find details here: https://gist.github.com/lukecav/05afef12feaf980c121da9afb9291ad5
Another approach is https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query . Use if....else and store order data in Arr[product_id] = OrderArr
Kindly accept my answer if it is of any help.
this is actually the same method I follow when I'm about 60-80% complete with the total theme build. it allows my client (or my co-workers) to work on the content and update the pages and thus the database on the staging server while I continue working locally on other custom page development, templates, etc.
the only downside I've experienced is that it ...
Wordpress, and many of its plugins, store configuration data in the database. That alone could cause issues for the setup you described, but the urls of every link will also be stored fully canonicalized. So, unless you plan to test your staging setup from "http://localhost", you will have serious issues trying to click around multiple resources for ...
If I correctly understood, this is not possible (two queries instead of one).
I ended up with this sad and time-consuming loop... :/
$querystr = $wpdb->prepare("SELECT subtrack_id FROM `$subtracks_table` WHERE tracklist_id='%d' ORDER BY `subtrack_time` ASC",$this->post_id);
if ( !$ids = $wpdb->get_col($querystr) ) return;...
As Pat J says, you shouldn't have define( 'WP_USE_EXT_MYSQL', true); unless you need the old mysql functions, which you do not if you're using PHP 7x and WordPress 5x. You do need to restart Apache after modifying php.ini. What do you have in your mysqli section of your phpinfo? Make sure extension_dir is set in php.ini, too. You may need to enable php.ini ...