Re: Postgresql.conf

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Laurent Manchon" <lmanchon(at)univ-montp2(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql.conf
Date: 2007-01-23 19:15:39
Message-ID: b42b73150701231115u147c0b90kf65d92613f7800f2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/23/07, 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.
>
> My server is a DELL PowerEdge 2600 with bi-processor Xeon at 3.2 Ghz
> with 3GBytes RAM

if you need a fast approximate answer (up to date as of last analyze),
you can do something like:

select reltuples from pg_class where relname = 'tbl' and relkind = 'r';

if you need a fast exact answer, you need to write a trigger.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Kroeger 2007-01-23 19:40:13 Re: Installing PostgreSQL under Cpanel
Previous Message Jeremy Haile 2007-01-23 19:15:23 Re: Postgresql.conf