Re: fast count(*) through statistics collector - Mailing list pgsql-hackers

From Tom Lane
Subject Re: fast count(*) through statistics collector
Date
Msg-id 24335.1205910412@sss.pgh.pa.us
Whole thread Raw
In response to fast count(*) through statistics collector  (Artem Yazkov <markkrass@inbox.ru>)
List pgsql-hackers
Artem Yazkov <markkrass@inbox.ru> writes:
> By  viewing  this  list,  I see a lot of discussions on the problem of
> "fast  count  (*)",  but acceptable decision have not been formulated.
> Well,  I  make  bold  to  propose  own  view on the problem.

A number of the things you suggest would be good for improving the
performance of the stats subsystem.  But I think you have failed to
grasp two pretty fundamental issues: (1) the correct answer to count(*)
varies depending on the observer's snapshot, and (2) the stats subsystem
is built to provide approximate answers not exact ones.

I encourage you to work on fixing the stats subsystem's performance
issues ... but if you think that's going to provide a substitute for
count(*), you're mistaken.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Manolo
Date:
Subject: Re: CVS problems
Next
From: "Pavel Stehule"
Date:
Subject: regress test problems