Re: Poor performance on very simple query ?

From: Tobias Brox <tobias(at)nordicbet(dot)com>
To: Arnaud Lesauvage <thewild(at)freesurf(dot)fr>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Poor performance on very simple query ?
Date: 2006-10-03 12:10:04
Message-ID: 20061003121004.GC30211@oppetid.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tobias Brox 2006-10-03 12:11:09 Re: Poor performance on very simple query ?
Previous Message Alexander Staubo 2006-10-03 12:08:03 Re: Poor performance on very simple query ?