Optimizing IP Range Search?
I'm assuming there is a typo in the question as per Martin's comment.

A problem with a single range seek on either ipFrom or ipTo is that on average it will need to seek half the table. An alternative approach is

1) Add a computed column, on something like: 

 ALTER TABLE MyTable
  ADD granule 
AS CASE WHEN (ipTo-ipFrom)&lt;16 THEN 1 WHEN (ipTo-ipFrom)&lt;256 THEN 2 ELSE 3 END;


2) Index the computed column and ipFrom

CREATE ClUSTERED INDEX IX ON MyTable(granule, ipFrom ); 


3) Query like this:  

SELECT url
FROM   MyTable
WHERE  granule = 1
       AND ipFrom BETWEEN @somevalue - 16 AND @somevalue
       AND ipTo &gt;= @somevalue
UNION ALL
SELECT url
FROM   MyTable
WHERE  granule = 2
       AND ipFrom BETWEEN @somevalue - 256 AND @somevalue
       AND ipTo &gt;= @somevalue
UNION ALL
SELECT url
FROM   MyTable
WHERE  granule = 3
       AND ipFrom &lt;= @somevalue
       AND ipTo &gt;= @somevalue;


Precisely how you define the 'granule' function will depend on the spead of ipto-ipfrom in your data.