From: Michael Best <mbest@pendragon.org>
To: pgsql-performance@postgresql.org
Subject: Re: how postgresql request the computer resources
Date: Thu, 27 Oct 2005 15:58:55 -0600
Message-ID: <43614D9F.9010600@pendragon.org> (raw)
In-Reply-To: <4360F8C1.4040202@archonet.com>
References: <BAY23-F28F5DD23A4A73C7BFE3CD1CE680@phx.gbl>
<4360F8C1.4040202@archonet.com>
Richard Huxton wrote:
>> WITH ANY OF THIS QUERIES MSSQL TAKES NOT MUCH OF 7 SECONDS....
>
>
> In which case they make a bad choice for showing PostgreSQL is faster
> than MSSQL. Is this the only query you have, or are others giving you
> problems too?
>
> I think count(*) is about the weakest point in PG, but I don't think
> there'll be a general solution available soon. As I'm sure someone has
> mentioned, whatever else, PG needs to check the row for its visibility
> information.
>
> From the start of your email, you seem to suspect your configuration
> needs some work. Once you are happy that your settings in general are
> good, you can override some by issuing set statements before your query.
> For example:
> SET work_mem = 10000;
> might well improve example #2 where you had a hash.
>
> --
> Richard Huxton
> Archonet Ltd
Someone had suggested keeping a vector table with +1 and -1 for row
insertion and deletion and then running a cron to sum the vectors and
update a table so that you could select from that table to get the row
count. Perhaps some sort of SUM() on a column function.
Since this seems like a reasonable approach (or perhaps there may be yet
another better mechanism), cannot someone add this sort of functionality
to Postgresql to do behind the scenes?
-Mike
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: mbest@pendragon.org
Subject: Re: how postgresql request the computer resources
In-Reply-To: <43614D9F.9010600@pendragon.org>
* 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