Re: Poor performance on very simple query ? - Mailing list pgsql-performance

From Tobias Brox
Subject Re: Poor performance on very simple query ?
Date
Msg-id 20061003121004.GC30211@oppetid.no
Whole thread Raw
In response to Poor performance on very simple query ?  (Arnaud Lesauvage <thewild@freesurf.fr>)
Responses Re: Poor performance on very simple query ?
List pgsql-performance
[Arnaud Lesauvage - Tue at 01:25:10PM +0200]
> I have a performance problem, but I am not sure whether it really
> is a problem or not.
>       QUERY PLAN
>
------------------------------------------------------------------------------------------------------------------------------------------------------
>   Seq Scan on table1  (cost=0.00..23.69 rows=10 width=35) (actual
> time=0.023..0.734 rows=7 loops=1)
>     Filter: ((gid = 33) OR (gid = 110) OR (gid = 65) OR (gid = 84)
> OR (gid = 92) OR (gid = 94) OR (gid = 13) OR (gid = 7) OR (gid =
> 68) OR (gid = 41))
>   Total runtime: 0.801 ms
> (3 rows)
>
> I have run "VACUUM FULL" on this table many times... I don't know
> what to try next !
> What is wrong here (because I hope that something is wrong) ?
> Thanks a lot for your help !

Did you try "analyze" as well?  It's weird it's using seq scan, since
you have a primary key it's supposed to have an index ... though 500
rows is little.

I just checked up our own production database, takes 0.08 ms to fetch a
row by ID from one of our tables containing 176k with rows.

pgsql-performance by date:

Previous
From: Alexander Staubo
Date:
Subject: Re: Poor performance on very simple query ?
Next
From: Tobias Brox
Date:
Subject: Re: Poor performance on very simple query ?