Smush Pro page can't load the Setting pages

When I try to activate the Smush Plugin and get the Setting Pages, it takes more than 20 minutes, then it gives a timeout page.

I see the Plugin is running this query

SELECT ID FROM vetg_posts WHERE post_type = 'attachment' AND post_status = 'inherit' AND post_mime_type IN ('image/jpg', 'image/jpeg', 'image/x-citrix-jpeg', 'image/gif', 'image/png', 'image/x-png') ORDER BY ID DESC LIMIT 0, 2000

But the problem is that my table got over 700,000 rows.

How can we do this process work better?

  • Jonjon
    • Code Killa

    Hi there Bill.

    Hope you are doing great and thank you for contacting us.

    Did the increase in timeout (define('WP_SMUSH_API_TIMEOUT', 600):wink: help you resolving this issue? We will be waiting for your feedback.

    Best Regards,
    Jon

  • Bill
    • New Recruit

    Hello, it turns out that this did eventually run - the trouble is, with 800,000 rows in the table it takes around 30mins to load the page. It's this query that is the issue:

    SELECT ID FROM <posts_table> WHERE post_type = 'attachment' AND post_status = 'inherit' AND post_mime_type IN ('image/jpg', 'image/jpeg', 'image/x-citrix-jpeg', 'image/gif', 'image/png', 'image/x-png') ORDER BY ID DESC LIMIT 0, 2000

  • Jonjon
    • Code Killa

    Hi Bill.

    Thank you for your feedback.

    I have consulted this with the developers and I'm afraid there is not much we can do as we have to stick with the WordPress database format. A personalized table just for images would be faster as well, but 800,000 files represent quite a query anyway.

    I'm glad it worked in the end and let us know if we can help anyway.

    Best,
    Jon

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.