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?