0

I'm a newbie to MySQL so apologising in advance if the question seems silly. I have a transaction log table that is very big (contains 18M rows) and is growing at a very fast rate. The records that are over 3 months old are not used in the day-to-day flows and hence I'm looking at a way to split the table and then archive the older records. I'm looking at partitioning the table as a way to do this. My question is this:

If I partition the table based on a date column,how does that affect the indexes that are NOT based on the partitioned date column ? If there is a select query that uses one of these indexes, then will the partition containing the older records be searched as well? because that kind of defeats the whole point of partitioning for me.

Is there any other approach that you would recommend?

Thanks in advance.

1 Answer 1

1

(a non-answer)

PARTITIONing is useful in only a few use cases. Let's see your SELECTs so we can consider whether any of them would benefit from partitioning.

If your queries are like "count the widgets for last week", then you may be looking at Data Warehouse techniques like "Summary Tables". This is quite effective, performancewise, and does not (usually) involve partitioning.

More on partitioning use cases: http://mysql.rjweb.org/doc.php/latlng

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.