Archived topic
attachment_url_to_postid slow queries with postmeta
3 replies · Started by Ernesto Justiniano on October 7, 2021
Hi,
Please look at the image. It is self-explanatory.
https://1drv.ms/u/s!AnVaf1zfJIy_rN5CW4witANdhrS82Q?e=IP9VH8
Please fix it.
Kind regards,
Ernesto
Hi there,
Our mobile header logo uses this function to get its width/height data. We'll be adjusting this so the ID is saved (not the URL) so the function isn't needed.
However, for now, you might want to look into why it's performing so badly.
Here's one of my sites for example: https://www.screencast.com/t/nHWZ1uUMQH6j
It's a somewhat expensive function, but it definitely shouldn't be that bad.
Hi,
Thank you. We do have 599.971 posts after 13 years of work. Maybe our posts and postmeta are too large. Or we are having another problem. You can check eju.tv
Kind regards,
Ernesto.
That could certainly be why - I would imagine quite a few queries on your site might take longer than normal with that number of posts.
This is something we'll be looking at changing in GPP 2.2.0.
Thanks!