Search Postgresql Archives

Re: Row number estimation...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 18 Oct 2014 11:34:18 -0400, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
 
> If the comparison value is outside the range recorded in the histogram,
> and there's a suitable index available, the planner uses the index to
> find out the actual column min or max rather than believing the
histogram
> completely.  See get_actual_variable_range().

Substituting the first histogram value with 1 (the lowest value in the
column/index) and redoing the calculation give the same numbers as the
EXPLAIN ANALISE does.

But how so that the selectivity is now not capped to 0.0001? Without the
index I couldn't get an estimate lower than 100 rows, but with the index
the estimates go all the way down to 1. 

 
> Possibly this behavior ought to be mentioned in the docs ...
It would help a lot :)

Regards,
Mladen Marinović


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux