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: (view raw, whole thread or download thread mbox)
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




Pam Ozer


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-2017 The PostgreSQL Global Development Group