MySQL Forums
Forum List  »  Performance

Re: ORDER BY / GROYP BY slow - MySQL 8.0
Posted by: Christos Chatzaras
Date: January 09, 2022 09:13AM

With help from Xgc from #mysql the issue is resolved using indexes:

CREATE INDEX xxx1 ON wpks_posts (ID, post_type, post_status, post_date);
CREATE INDEX xxx2 ON wpks_term_relationships (object_id, term_taxonomy_id);
CREATE INDEX xxx3 ON wpks_postmeta (post_id, meta_key(20), meta_value(20));

Now these queries take 0.12 sec.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: ORDER BY / GROYP BY slow - MySQL 8.0
324
January 09, 2022 09:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.