Re: What am I missing? Explain row estimate wrong

From: Feike Steenbergen <feikesteenbergen(at)gmail(dot)com>
To: Jorge Torralba <jorge(dot)torralba(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: What am I missing? Explain row estimate wrong
Date: 2016-10-08 05:14:01
Message-ID: CAK_s-G2Bkn=A5dzgBa5CsgFy=xhDePbPw0ou_iaV-aerTgRvDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> select histogram_bounds from pg_stats where tablename ='mytable' and
attname = 'id';

Do any of the < 12345 values appear in the most_common_vals (mcv) list?
https://www.postgresql.org/docs/current/static/view-pg-stats.html

To my knowledge, mcv entries are calculated first, and then the histogram
bounds are taken into account:
https://www.postgresql.org/docs/current/static/row-estimation-examples.html

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2016-10-10 14:37:44 Re: open database on read only file system
Previous Message xujian 2016-10-08 02:15:13 Re: open database on read only file system