Re: how to speed query - Mailing list pgsql-general

From Herbert Liechti
Subject Re: how to speed query
Date
Msg-id 3BA6023C.D805F67E@thinx.ch
Whole thread Raw
In response to how to speed query  (T.R.Missner@Level3.com)
List pgsql-general
On Fri, 14 Sep 2001 T.R.Missner@Level3.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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Transition from MS-SQL - Store Procedures?
Next
From: degoble@sgtech (David. E. Goble)
Date:
Subject: I could do with some guidance