Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group