AW: [HACKERS] Bug#48582: psql spends hours computing results it a lready knows (fwd) - Mailing list pgsql-hackers

From Zeugswetter Andreas IZ5
Subject AW: [HACKERS] Bug#48582: psql spends hours computing results it a lready knows (fwd)
Date
Msg-id 219F68D65015D011A8E000006F8590C60339E157@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
List pgsql-hackers
> The optimizer is perfectly happy with approximate tuple counts, so it
> makes do with stats recorded at the last VACUUM.
> 
> This has been discussed quite recently on pg-hackers; see the archives
> for more info.

Yes, the problem is not the optimizer. The problem is the select count(*).
A lot of DB's (like Informix) have a shortcut on this, and even though they
have it,
they don't use it for the optimizer.

If our btrees have an accurate count (deleted rows ?), scanning the smallest
index 
would also be alot faster.

Andreas


pgsql-hackers by date:

Previous
From: Brian E Gallew
Date:
Subject: Re: [HACKERS] Bug#48582: psql spends hours computing results it already knows (fwd)
Next
From: Zakkr
Date:
Subject: view vs. inheritance hierarchy (was: Bug(?) in pg_get_ruledef())