- Persuming “article_datetime” to be a numeric value, I would suggest that instead of using ‘orderby’ => ‘meta_value’ use ‘orderby’ => ‘meta_value_num’
-
If still query is slow, than remove:
‘orderby’ => ‘meta_value’,
‘meta_key’ => ‘article_datetime’,
‘order’ => ‘DESC’
and instead sort the result in php.
Related Posts:
- WordPress database scalability from the code perspective
- Performance tips for a large user base [closed]
- WP_Options ID high
- WordPress for a very large website
- WordPress database becoming huge. How to analyze and optimize it? fear of running out of memory
- WooCommerce with thousands of products – site is very slow – optimize db queries? [closed]
- Efficiency on displaying random authors based on large database
- How to solve slow WordPress site caused by attachment_metadata
- Relationship between performance and database size
- Database slowdown after update to 3.4.1
- wp_redirection_404 table has grown to 7GB
- Which is more efficient? Using usermeta, or creating a new MySQL table?
- One post carries 30 postmeta values, is this too much?
- Multiple wp_options tables to share content across installs
- Improve performance by removing unnecessary database queries
- fastest replacement DB
- How to prevent/delay MySQL connections when an object cache is used?
- Does auto_load to ‘no’ in wp_options improve performance
- How to combine multiple wp_insert_post into one in order to gain better performance
- Optimizing function that automatically creates internal links based on post title string
- Counting post and changing roles in mysql database. Query not code
- Is there anyway to split posts to different databases?
- Job and Employee Performance Tracking with Product Safety
- What structure and database storage method should I use for temporary storage that may be written concurrently?
- Get all top categories, then only 3 posts for each
- Best way to store 1 billion+ posts?
- Optimize WP site for millions of posts
- Counting user’s comments – efficient way?
- Performance bug – slow DB query
- Mysql Queries per Visit – Crazy High
- Database synchronization between dev/staging and production
- Multiple developers / editors working on a site in progress
- WordPress Database lost auto increment
- Count & Display Database Queries
- How to integrate custom database table in WordPress and using WordPress functions
- How to use “TRUNCATE TABLE” MySQL statement?
- Slow SQL_CALC_FOUND_ROWS Query
- Export wordpress table to excel
- Meta query interfering with orderby relevance
- get_the_title($postID) OR get_the_title()?
- Is removing orphaned wp_postmeta records safe?
- How to intercept update_option() before it saves data?
- wpdb query on custom table not working [closed]
- Set Display Name to first and last name (phpmyadmin SQL Query)
- How to fix unchanged URLs in Database after running serialized search and replace script?
- How to query the WordPress database to get posts of a certain custom post type, taxonomy and field?
- SQL Error wp_commentmeta – incorrect table definition
- WordPress database error – Error in SQL syntax – I can’t identify any error?
- Merging two wp_posts tables while avoiding duplicates
- How can i add custom fields into the contact form 7 [closed]
- Merging two databases without borking it
- How Yoast SEO plugin works with variable %%name%%?
- Move out of sync posts from one database to another
- MS Access to manage WordPress Database
- Query multiple tables at once?
- Custom WordPress Table wpdb
- CreateOrUpdate in WordPress
- $wpdb->get_results($wpdb->prepare(… You have an error in your SQL syntax;
- Transferring/Uploading Data from DB to WordPress
- Can local WordPress installs share /wp-content/ folder and database?
- how to encyrpt DB_PASSWORD in wp-config
- Choosing http or https during manual installation of WordPress and database
- Stringing together content from different databases
- Delete all posts that do NOT have a specific tag
- Changing order of db results when encoding to JSON
- Safely store code(html/js..) into database
- Why does wp_links still exist in the db schema?
- can’t upgrade wordpress or install plugins, it seems to “think” it’s still on a local installation
- Compare User meta_value with Product meta_value
- Link multiple user databases together?
- Sql query to get all metadata for a post
- Where do I put my create_new_table function()?
- Is there any defects for using same database prefix in WordPress for multiple sites?
- Can we store password in without being hashing?
- How to import products in host instead of database on wordpress?
- syntax error for changing user role from database
- I would like some help wth an SQL query to link posts with categories
- get_option() does unserialize and don’t remove \
- Want to update value in database. But it says update() on null
- Merging development site with live site
- The MySQL Connection could not be established., before it was joomla but i have change it into worpress
- Both VPS and domain changed but Database URL stayed the same and PHPmyadmin inaccessible to change it
- Filtering data and saving query results
- live site do not update after importing sql database
- Transforming an wp_options database array into a javascript obect?
- Selecting NULL value from the database
- Database connection close
- Is saving multiple options or saving multiple items in one option better?
- WordPress Database Charset/Collate
- Print output of Table Creation
- Recommended Post Structure for DB Storage
- How to delete field using WPDB?
- trying to install wp but i have no clue on hosting and servers [closed]
- Theme Options – localhost to new url
- Best way to search and replace within serialized database strings?
- What effect can a large wp_post table have on overall site performance?
- How can i change the nicename and the displayname in a bulk in the database?
- cannot access wp-admin after options table crash and repair
- How to update multiple row by one query
- Have WordPress Use a Different Database for users