From: Tobias Brox <tobias@nordicbet.com>
To: Arnaud Lesauvage <thewild@freesurf.fr>
Cc: pgsql-performance@postgresql.org
Subject: Re: Poor performance on very simple query ?
Date: Tue, 3 Oct 2006 14:10:04 +0200
Message-ID: <20061003121004.GC30211@oppetid.no> (raw)
In-Reply-To: <45224896.7040708@freesurf.fr>
References: <45224896.7040708@freesurf.fr>
[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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tobias@nordicbet.com, thewild@freesurf.fr
Subject: Re: Poor performance on very simple query ?
In-Reply-To: <20061003121004.GC30211@oppetid.no>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox