MySQL Forums
Forum List  »  Partitioning

Can you Partition BETWEEN 2 fields?
Posted by: wes mahler
Date: January 04, 2008 04:24AM

I have a TABLE that holds the IP NETRANGES. Table looks like this:

id (INT), ipfrom (INT), ipto (INT)

1, 2147483647, 2147483647
2, 2130706431, 2113929216
3, 2113929215, 2113880064


I know partitions work great when for instance have a daterange, so the partition is on one FIELD, and u you select BETWEEN IT.

But in here, I select between the LOW, and the HI, netranges to grab the id.

ie: SELECT id FROM xxx WHERE ipfrom >= 1135173476 AND ipto <= 1135173476


So my question is, I can't really use partitions here can I? I mean it doesn't really support what I'm trying to do does it? Any thoughts on this, I hope I was clear.

I have 1,500,000 million different rows, each id is associated with a netrange, so without partitioning finding the id within a netrange is hard, but I can't seem to find a way that I would potentially even be able to partition this. Thoughts?

Options: ReplyQuote

Written By
Can you Partition BETWEEN 2 fields?
January 04, 2008 04:24AM
January 04, 2008 04:36AM

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.