Re: Incorrect assumptions with low LIMITs
От
Greg Stark
Тема
Re: Incorrect assumptions with low LIMITs
Дата
Msg-id
CAM-w4HNt0ysQOu8NqYK__x0U37jfF4EPHkq4ou26EKODm=9-fA@mail.gmail.com
Ответ на
Re: Incorrect assumptions with low LIMITs (Simon Riggs)
Список
Дерево обсуждения
Incorrect assumptions with low LIMITs Simon Riggs <simon@2ndQuadrant.com>
Re: Incorrect assumptions with low LIMITs Jeff Davis <pgsql@j-davis.com>
Re: Incorrect assumptions with low LIMITs Simon Riggs <simon@2ndQuadrant.com>
Re: Incorrect assumptions with low LIMITs Tom Lane <tgl@sss.pgh.pa.us>
Re: Incorrect assumptions with low LIMITs Simon Riggs <simon@2ndquadrant.com>
Re: Incorrect assumptions with low LIMITs Greg Stark <stark@mit.edu>
Re: Incorrect assumptions with low LIMITs Simon Riggs <simon@2ndQuadrant.com>
Re: Incorrect assumptions with low LIMITs Jeff Davis <pgsql@j-davis.com>
Re: Incorrect assumptions with low LIMITs Daniel Farina <daniel@heroku.com>
On Sat, Mar 17, 2012 at 9:34 AM, Simon Riggs wrote:
> My wish was to register this as both a common and significant bug,
It has definitely come up here before many times.
However at root the problem is part of the general class of not
understanding how two different columns are related. Postgres is
assuming they're entirely independent and therefore all the values of
x are uniformly distributed over values of y.
To plan this better in your case it would have to know that blah_id <=
72572020 is not equally likely for user_id = ANY
('{....list....}'::integer[]) as it is for the table as a whole.
--
greg
В списке pgsql-hackers по дате отправления