MySQL Forums
Forum List  »  Partitioning

Re: IP vs Date Partition
Posted by: Tim Linden
Date: May 15, 2013 10:06AM

Thanks!

That does make sense. What I ended up doing is partitioning by day, and changing the code to check only for today and insert a new record if needed. That way we're only checking against a day's worth of data. We only use the old data on rare occassions.

Doing some testing the SELECT / INSERT or SELECT / UPDATE rather than a single ON DUPLICATE KEY UPDATE is about the same amount of time (very slighlty more on average). But the old data being removed quickly and efficiently and not growing like the old system has been worth it.

Your login however will prove useful in other parts of the code, thanks!

Tim

Options: ReplyQuote


Subject
Views
Written By
Posted
2550
May 13, 2013 10:28AM
1624
May 14, 2013 09:59PM
Re: IP vs Date Partition
1598
May 15, 2013 10:06AM


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.