Re: Cross-table statistics idea - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cross-table statistics idea
Date
Msg-id 2906.1159324966@sss.pgh.pa.us
Whole thread Raw
In response to Cross-table statistics idea  ("Jim C. Nasby" <jim@nasby.net>)
List pgsql-hackers
"Jim C. Nasby" <jim@nasby.net> writes:
> ISTM that we could gain additional insight on how many rows would likely
> result from a join be comparing the "shape" of the histogram for the
> joining columns.

eqjoinsel already does this for the case of comparing the MCV lists.
If you're serious about using the histograms: well, maybe, but it seems
to require far stronger assumptions about the behavior of the datatype
than we use now.

> Am I right about how our estimates work right now? Where can I look in
> the code? Has anyone looked down this path in the past?

src/backend/utils/adt/selfuncs.c
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Cross-table statistics idea
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Block B-Tree concept