Skip site navigation (1) Skip section navigation (2)

Re: slow result

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
To: "Bruno Wolff III" <bruno(at)wolff(dot)to>, "Laurent Manchon" <lmanchon(at)univ-montp2(dot)fr>, pgsql-performance(at)postgresql(dot)org
Subject: Re: slow result
Date: 2007-01-24 10:19:22
Message-ID: bf54be870701240219m6190d68fnde87348f51cf78b8@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
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(at)wolff(dot)to> wrote:
>
> On Tue, Jan 23, 2007 at 11:34:52 +0100,
>   Laurent Manchon <lmanchon(at)univ-montp2(dot)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
>

In response to

pgsql-performance by date

Next:From: Jim C. NasbyDate: 2007-01-25 03:39:17
Subject: Re: how to plan for vacuum?
Previous:From: Heiko W.RuppDate: 2007-01-24 09:12:43
Subject: Re: Auto Vacuum Problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group