Re: Wrong estimate in query plan
От | David Johnston |
---|---|
Тема | Re: Wrong estimate in query plan |
Дата | |
Msg-id | 1382624991276-5775785.post@n5.nabble.com обсуждение исходный текст |
Ответ на | Wrong estimate in query plan (Eelke Klein <eelke@bolt.nl>) |
Список | pgsql-general |
Eelke Klein wrote > What I noticed is that are no most common values mentioned ofcourse the > value 1 only occurs once in the column but as all other values are NULL > you > could argue it is a common value. A random sampling is unlikely to choose a record that only appears in 0.1 percent of the table. Two sequential scans plus a hash seems like a good plan. The smaller table is so small a sequential scan is fast. The larger table experts to have all records read so it to should be scanned. Combining with a hash seems sound. The fact the cross-column estimate is way off isn't that big a deal though I'd be curious to hear Tom's opinion on why this is so for educational purposes. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Wrong-estimate-in-query-plan-tp5775727p5775785.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
В списке pgsql-general по дате отправления: