Tom Lane wrote:
>
> Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
> > Another metric that would be interesing is a number that represents
> > the divergence of the heap order from the index sort order.
>
> Oh, absolutely!  Got any ideas about how to get that number in a
> reasonable amount of time (not too much more than VACUUM takes now)?
> I've been drawing a blank :-(
>

It seems hard to find the practical theory.
So how about a kind of sample scanning in a separate ANALYZE
command ?

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp

Fri, 19 May 2000 01:15:28 +0900
Hiroshi Inoue <Inoue@tpf.co.jp>
RE: AW: question about index cost estimates
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> So how about a kind of sample scanning in a separate ANALYZE
> command ?

I do think it'd be a good idea to separate out the stats-gathering
into an ANALYZE command that can be invoked separately from VACUUM.
For one thing, there's no good reason to hold down an exclusive
lock on the target table while we are gathering stats.

But that doesn't answer the question: how can we measure the extent
to which a table is in the same order as an index?  And even that
is too one-dimensional a concept to apply to r-tree indexes, for
example.  What do we do for r-trees?

			regards, tom lane

Thu, 18 May 2000 12:29:03 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: AW: question about index cost estimates 