MySQL Forums
Forum List  »  Partitioning

Re: Wrong index used in SELECT , ROW_NUMBER() OVER (PARTITION BY
Posted by: Michael Zatkovetsky
Date: August 20, 2021 05:48PM

Sorry I posted a wrong query probably to a wrong thread. I do not see how I can edit my post.

This is the query I need help with:

explain SELECT t.*, ROW_NUMBER() OVER (PARTITION BY client_id, end_date, division_id ORDER BY some_val DESC) AS rn
FROM test_table t
WHERE client_id = 102
AND end_date <= '2022-07-30 14:53:27'
AND end_date >= '2020-07-30 14:53:27'
AND division_id is not null;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Wrong index used in SELECT , ROW_NUMBER() OVER (PARTITION BY
64
August 20, 2021 05:48PM


Sorry, only registered users may post in this forum.

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.