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