Using Between

From: "Ozer, Pam" <pozer(at)automotive(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: Using Between
Date: 2010-08-28 00:21:48
Message-ID: C3CA20D47A2DF94FBF9CF0AE8D964CC4124399@mail-001.corp.automotive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Craig James 2010-08-28 00:41:53 Re: Using Between
Previous Message Scott Marlowe 2010-08-27 17:57:54 Re: turn off caching for performance test