I have a table that has a binary column that represents IP Address data. One of the queries perform a BETWEEN comparison on that binary column.
If I index that column, will performance improve for the BETWEEN comparison in the SQL Statement?
In this example...
SELECT * FROM MyTable WHERE BinaryCol BETWEEN x and y
SELECT *
could mean that the index is ignored, especially if the x/y cover a large proportion of the tableAnd is this example...
SELECT BinaryCol, AnotherCol, YetAnotherCol FROM MyTable WHERE BinaryCol BETWEEN x and y
Unfortunately, "it depends"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With