Re: Please consider removing "select count(*)..."

From: "Yurgis Baykshtis" <ybaykshtis(at)aurigin(dot)com>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>, <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Please consider removing "select count(*)..."
Date: 2003-05-23 20:26:43
Message-ID: 56510AAEF435D240958D1CE8C6B1770A0138A582@mailc03.aurigin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, Dave.
A similar issue exists in the data view again for both versions.
pgAdmin II calculates number of rows first then asks for a limit.

But as far as I understood, this will be eventually resolved once data
views support cursors.

-----Original Message-----
From: Dave Page [mailto:dpage(at)vale-housing(dot)co(dot)uk]
Sent: Friday, May 23, 2003 12:47 PM
To: Yurgis Baykshtis; pgadmin-hackers(at)postgresql(dot)org
Subject: RE: [pgadmin-hackers] Please consider removing "select
count(*)..."

> -----Original Message-----
> From: Yurgis Baykshtis [mailto:ybaykshtis(at)aurigin(dot)com]
> Sent: 23 May 2003 19:46
> To: pgadmin-hackers(at)postgresql(dot)org
> Subject: [pgadmin-hackers] Please consider removing "select
> count(*)..."
>
>
> In both pgAdmin 2 and 3, whenever I click on a table node in
> the object tree, for a table with relatively big number of
> rows, it's taking a very long time to update the property
> panel (up to a few minutes with very high CPU load by the
> postgres process) making practically impossible usage of the
> tool. The reason is in the "select count(*)" query pgAdmin
> use to get table row count.
> I am not sure whether there is another way to count table
> rows in Postgres, but I see it does not like 'select
> count(*)' much for large tables.
>
> I just commented out this query for myself forcing row count
> field to be always zero and it works just fine for me.

Hi Yurgis,

I've now added an option for this to the pgAdmin III CVS.

Regards, Dave.

Browse pgadmin-hackers by date

  From Date Subject
Next Message Andreas Pflug 2003-05-23 22:48:43 Re: Please consider removing "select count(*)..."
Previous Message Dave Page 2003-05-23 19:46:46 Re: Please consider removing "select count(*)..."