Indexing and Partition on same column

Can we have partition on date column like :


and Indexing on the same column based on Hour of the day like:

CREATE INDEX index_name ON tabel_name (HOUR(date_time));

Partition is required so that later data can be deleted easily by simply dropping the partition. Indexing we are trying to speed up the query based on date_time column (since for a single day too there would be millions of rows).

Is it the correct way and how will it behave? Also any other better approach?

Asked on September 1, 2020 in Mysql.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.