From: | Herbert Liechti <herbert(dot)liechti(at)thinx(dot)ch> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: how to speed query |
Date: | 2001-09-17 14:01:32 |
Message-ID: | 3BA6023C.D805F67E@thinx.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 14 Sep 2001 T(dot)R(dot)Missner(at)Level3(dot)com wrote:
> Here is a slimmed down example of my table
>
> table sipmsg(
>
> time long,
> callid varchar(256)
>
> )
>
> the query simply asks for all callids between 2 times.
> I have an index on the time column but it doesn't get used.
> Is there a better way for me to be doing this?
> Seems so simple.
>
> more info:
> the table now has over 200k rows or which the average query will return a
> couple of hundred rows.
> running on solaris 8 at 433mhz ( i think ) with 1 gig of memory
Did you made a vacuum analyze?
Do you have a index defined for that column?
Eventually a 'set enable_seqscan = off;' will help you.
Best regards
Herbie
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Herbert Liechti http://www.thinx.ch
ThinX networked business services Adlergasse 5, CH-4500 Solothurn
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From | Date | Subject | |
---|---|---|---|
Next Message | Doug McNaught | 2001-09-17 14:02:42 | Re: Transition from MS-SQL - Store Procedures? |
Previous Message | Martijn van Oosterhout | 2001-09-17 14:01:19 | Re: how to speed query |