Try to cut the query in smaller parts, using temporary tables. Having sub queries is always time, memory and cpu consuming.
That should do the trick.
Related Posts:
- How does WordPress handle MySQL row lock errors?
- $wpdb->get_results() does not fetch results with unicode ‘WHERE’ clause
- Help With MySQL to WPDB Query Conversion
- Creating mySQL procedure with $wpdb
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- WordPress plugin creation how to execute .sql in order to insert multiple rows at activation of plugin
- Plugin: register_deactivation_hook works perfectly well, while register_activation_hook suddenly stopped working
- Insert data from .sql file in wordpress plugin
- WordPress Backend HA (Automatic failover)
- DB Query not working in Plugin
- Way to send multiple values for column to MySQL?
- WordPress plugin: efficient way to store large data
- Plugin generating unexpected output – on WP mysql dump import
- Can’t create tables with my plugin
- Integrating Custom Database with WordPress
- How to display results from a data table with an encrypted user id?
- How to get the custom field value using SQL query
- Need to know if my approach to designing a geneaology plug-in for wordpress makes sense
- I created a plugin with ‘view page’ that uses MYSQL + PHP. When I use wp_insert_post(), it turns everything to HTML
- WordPress UPDATE queries on MySQL database stuck
- Resetting AUTO_INCREMENT primary key
- Create Database Tables on Plugin Activation hook
- Linking Plugin Files to WP
- how to search through plugin in wordpress cimy-user-extra-fields?
- Get all the related data from WordPress DB
- How to display blog posts only authored by the administrator
- How can I delete the options from DB when the plugin is deleted?
- WP_Query does not return the result even if the data is present in the database
- What is difference between get_bloginfo(‘url’) and get_site_url()?
- Custom media upload content for inserting custom post shortcode
- Page Templates from plugin not working after upgrading WP to 4.7 or upper version
- How to add option box in “Edit Post” plugin API?
- Avoiding plugin name collisions with WP updater
- Searching users with WP_List_Table plugin
- Using standard backend elements in Plugin
- Plugin development: how to create a form and get custom data?
- Security error WP 4.0 + WP phpBB Bridge [closed]
- Execute a function using ajax
- Custom Shipping method not showing in checkout
- REST-API: extend media-endpoint
- How can I create a simple interface for my WP plugin?
- Where to put my global functions?
- Hidden Custom Post Type
- Where does WordPress register default scripts like jQuery?
- Adding Attachment Display Settings in custom media frame
- Is it possible to enqueue CSS files from plugin before theme’s CSS files?
- Determine Registered Admin Menus
- code is working properly in Core PHP but writing coding in WordPress
- Custom plugin init action causing general slowness
- Customised plugin failed to install and activate
- Why is one phpunit test throwing an error on one class when all other classes are similar without error?
- How to get all posts belongs to a user between a certain date
- wp-load.php redeclares classes
- Plugin main file is constantly been fired on every website visit
- Where should custom post types be registered in a plugin?
- output html on post or page from custom plugin [closed]
- Change the number of plugins counted on wp-admin/plugins.php
- plugin uninstall function drop the tables, but shows errors on admin
- How to use template inside plugin shortcode with variables for big HTML code
- WordPress Object Oriented plugin development [closed]
- What’s the right way to implement functions in footer.php
- Do rewrites added with add_rewrite_rule() persist after plugin deletion?
- Display my plugins content based on a pages post_id
- How can i list random author?
- Our plugin tags not appearing in WordPress Plugin Repository
- Make get_permalink() work outside the Loop using filters
- How to get values from network settings panel?
- Pluging with content for a specific page or post
- Does WordPress do any internal caching if no plugin installed?
- WordPress Plugin- How to Insert Html&JS code in specific Page and specific Div
- Getting current user data with MySQL statement
- Conditional delete metadata does not works
- Memcaching recurring SQL Queries
- Upload Image with a file URL and show dynamically on Frontend
- How can i solve php upgrade problem
- The function called on the wp head hook becomes null
- custom post type get_posts() function not work
- Create multiple posts when a custom post is created
- how override a define
- WordPress plugin blog creation
- Preserving existing functionality converting HTML to WordPress
- submit form data to wordpress existing database table using my plugin
- Prefix of $wpdb does not worked and does not displayed
- Get content and send to 3rd party
- Add predefined values to custom post plugin
- trying to create simple plugin to filter categories from all authors
- How to create a new database table whenever user changes options
- Am I correctly adding styles to plugin?
- How can I insert a record into a custom table from my custom form in my custom admin page?
- how to create table during plugin installation in side a class
- Proper Failure of Plugin Activation
- Why function hooked using object are executing at all time?
- What is the Object for WP_Error Class?
- Ajax in Plugins: returns the whole page
- WordPress 3,5 and Jquery version
- Any way to hook into WP after a page displays?
- Allow manage_options capability for specific user only for specific plugin?
- What are the implications of having main plugin file name different to plugin slug?
- How to secure custom endpoint for rest api in WordPress
- Cron Job not working