Re: COUNT(*) and index-only scans - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: COUNT(*) and index-only scans
Date
Msg-id 4E92FEAF0200002500041CF8@gw.wicourts.gov
Whole thread Raw
In response to Re: COUNT(*) and index-only scans  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: COUNT(*) and index-only scans  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I think what Robert is complaining about is that we won't
> currently consider an index that matches neither any WHERE clauses
> nor ORDER BY, ie, count(*) over the whole table won't get
> considered for an index-only scan, regardless of cost estimates.
I guess the trick would be to get it to consider such plans only
under some conditions, to avoid explosive growth in planning time
for some types of queries.  Some statistics bucket for the number of
non-frozen tuples in the relation, maybe?
-Kevin


pgsql-hackers by date:

Previous
From: Cédric Villemain
Date:
Subject: table/index options | was: COUNT(*) and index-only scans
Next
From: Magnus Hagander
Date:
Subject: Re: Bug in walsender when calling out to do_pg_stop_backup (and others?)