Slow Query issue.

Posted in: Newspaper
Post count: 68

Hi,
The below-mentioned query is very slow and it decreases my site performance. Please let me the purpose of this query and how to cache it. Currently, I’m using object cache. But this query is not getting cached.

SELECT post_id
FROM wp_postmeta
WHERE meta_key = ‘_wp_attached_file’
AND meta_value = ‘abc.logo’

Regards,
Satheesh

Post count: 35449

Hi,

Please read this topics:
What generates these very slow postmeta queries:
https://wordpress.stackexchange.com/questions/300455/what-generates-these-very-slow-postmeta-queries

WordPress database clean up queries:
-> https://gist.github.com/magnetikonline/10605567

Thank you for your understanding.

Post count: 68

Hi,
I don’t have any such lighbox plugin. Is that a theme specific query?. If so how to reduce the execution time of that query.

Post count: 35449

Hi,

Please tread thsi documentation about How to Optimize Your WordPress Database with One Click:
https://www.wpbeginner.com/plugins/optimize-your-wordpress-database-with-one-click/
Hope this will help you.

Thanks.

Post count: 68

Hi,
I have already done this but still, that particular query takes more time to run. Please let me know for what feature this query is running and how to tune this particular query.

Thanks,
Sathya

Post count: 35449

Hi,

Please read this documentation about How to Enable the query cache in MySQL -> http://www.aodba.com/enable-query-cache-mysql/

Thank you for your understanding.

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.