Re: Statistics and selectivity estimation for ranges
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-08-15T16:33:18Z
Lists: pgsql-hackers
Alexander Korotkov <aekorotkov@gmail.com> writes: > Ok, we've to decide if we need "standard" histogram. In some cases it can > be used for more accurate estimation of < and > operators. > But I think it is not so important. So, we can replace "standard" histogram > with histograms of lower and upper bounds? You should assign a new pg_statistic "kind" value (see pg_statistic.h) rather than mislabel this as being a standard histogram. However, there's nothing wrong with a data-type-specific stats collection function choosing to gather only this type of histogram and not the standard one. regards, tom lane