Re: How to optimize a range
I am having the same problem. Trying to match ip to company ip-range (start and end ip unsigned int) and between doesn't use index...
5M records in company-range table so it takes hours to update companies to 100 000 records...
I have tried to use primary key (start, end) and (primary key (start) and unique (end)) but it makes no difference.
Maybe somekind of range prefix would help? How many numbers it should be?
I mean adding prefix field to both tables and then checking table1.prefix=table2.prefix. My ip-ranges are from 33996344 to 3741319167 so would LEFT(ip, 3) be a good prefix?
Edited 3 time(s). Last edit at 07/13/2007 03:38AM by Niko Viitala.
Subject
Views
Written By
Posted
9023
August 02, 2006 07:56AM
4194
August 04, 2006 09:00AM
Re: How to optimize a range
4054
July 13, 2007 03:30AM
8916
July 18, 2007 04:52PM
3507
December 13, 2008 09:32PM
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.