Slow query – SQL Calc rows found
-
Hi!
I have a problem with slow queries on my site. I noticed high time to first byte on my server. I contacted my host and they told me that this query takes up to 3 seconds. This is the query:
SELECT SQL_CALC_FOUND_ROWS X5i3v_posts.ID FROM X5i3v_posts WHERE 1=1 AND X5i3v_posts.post_type = ‘ad_listing’ AND (X5i3v_posts.post_status = ‘publish’ OR X5i3v_posts.post_status = ‘tr_pending’ OR X5i3v_posts.post_status = ‘tr_failed’ OR X5i3v_posts.post_status = ‘tr_completed’ OR X5i3v_posts.post_status = ‘tr_activated’) ORDER BY RAND() LIMIT 0, 10
I have a loooot of posts. Now I know that SQL Calc Found Rows takes more time the bigger the database gets. Is there any way to disable or workaround this query?
I found a lot of old posts which doesn’t really help with the new wordpress and the files don’t refer to the latest wordpress files.
Please help me with this.
Warm greetings
Julia
- The topic ‘Slow query – SQL Calc rows found’ is closed to new replies.