Using Between - Mailing list pgsql-performance

From Ozer, Pam
Subject Using Between
Date
Msg-id C3CA20D47A2DF94FBF9CF0AE8D964CC4124399@mail-001.corp.automotive.com
Whole thread Raw
Responses Re: Using Between  (Craig James <craig_james@emolecules.com>)
List pgsql-performance

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

pgsql-performance by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: turn off caching for performance test
Next
From: Craig James
Date:
Subject: Re: Using Between