pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Shoaib Mir <shoaibmir@gmail.com>
To: Bruno Wolff III <bruno@wolff.to>
To: Laurent Manchon <lmanchon@univ-montp2.fr>
To: pgsql-performance@postgresql.org
Subject: Re: slow result
Date: Wed, 24 Jan 2007 15:19:22 +0500
Message-ID: <bf54be870701240219m6190d68fnde87348f51cf78b8@mail.gmail.com> (raw)
In-Reply-To: <20070123175951.GC20870@wolff.to>
References: <5.0.2.1.2.20070123113422.00d189e8@pop.univ-montp2.fr>
<20070123175951.GC20870@wolff.to>
You can also try this one:
ANALYZE tablename;
select reltuples from pg_class where relname = 'tablename';
Will also give almost the same results I guess...
-------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 1/23/07, Bruno Wolff III <bruno@wolff.to> wrote:
>
> On Tue, Jan 23, 2007 at 11:34:52 +0100,
> Laurent Manchon <lmanchon@univ-montp2.fr> wrote:
> > Hi,
> >
> > I have a slow response of my PostgreSQL database 7.4 using this query
> below
> > on a table with 800000 rows:
> >
> > select count(*)from tbl;
> >
> > PostgreSQL return result in 28 sec every time.
> > although MS-SQL return result in 0.02 sec every time.
>
> Besides the other advice mentioned in this thread, check that you don't
> have a lot of dead tuples in that table. 28 seconds seems a bit high
> for even a sequential scan of 800000 tuples unless they are pretty large.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
view thread (12+ messages)
Message-ID: <bf54be870701240219m6190d68fnde87348f51cf78b8@mail.gmail.com> Permalink: ../bf54be870701240219m6190d68fnde87348f51cf78b8@mail.gmail.com/ Also on: postgresql.org/message-id/bf54be870701240219m6190d68fnde87348f51cf78b8@mail.gmail.com ·
reply
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: shoaibmir@gmail.com, bruno@wolff.to, lmanchon@univ-montp2.fr Subject: Re: slow result In-Reply-To: <bf54be870701240219m6190d68fnde87348f51cf78b8@mail.gmail.com> * 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