Re: RFC: planner statistics in 7.2

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: RFC: planner statistics in 7.2
Date: 2001-04-20 18:40:37
Message-ID: 200104201840.f3KIebC09430@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> A different approach that's been discussed on pghackers is to make use
> of btree indexes for columns that have such indexes: we could scan the
> indexes to visit all the column values in sorted order. I have rejected
> that approach because (a) it doesn't help for columns without a suitable
> index; (b) our indexes don't distinguish deleted and live tuples,
> which would skew the statistics --- in particular, we couldn't tell a
> frequently-updated single tuple from a commonly repeated value; (c)
> scanning multiple indexes would likely require more total I/O than just
> grabbing sample tuples from the main table --- especially if we have to
> do that anyway to handle columns without indexes.

Remember one idea is for index scans to automatically update the expired
flag in the index bitfields when they check the heap tuple.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-04-20 18:51:23 Re: RFC: planner statistics in 7.2
Previous Message Ken Hirsch 2001-04-20 18:02:41 Re: [HACKERS] Hardcopy docs available