Using Between

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a query that

 

Select  Distinct VehicleId

From Vehicle

Where VehicleMileage between 0 and 15000.

 

I have an index on VehicleMileage.  Is there another way to put an index on a between?  The index is not being picked up.  It does get picked up when I run

 

Select  Distinct VehicleId

From Vehicle

Where VehicleMileage = 15000.

 

 

I just want to make sure that there is not a special index I should be using.

 

Thanks

 

Pam Ozer


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux