Re: Optimizer showing wrong rows in plan

От: Gary Doades
Тема: Re: Optimizer showing wrong rows in plan
Дата: ,
Msg-id: 4BAF20FA.30800@gpdnet.co.uk
(см: обсуждение, исходный текст)
Ответ на: Re: Optimizer showing wrong rows in plan  (Tadipathri Raghu)
Список: pgsql-performance

Скрыть дерево обсуждения

Optimizer showing wrong rows in plan  (Tadipathri Raghu, )
 Re: Optimizer showing wrong rows in plan  (Szymon Guz, )
  Re: Optimizer showing wrong rows in plan  (Tadipathri Raghu, )
   Re: Optimizer showing wrong rows in plan  (Szymon Guz, )
    Re: Optimizer showing wrong rows in plan  (Tadipathri Raghu, )
     Re: Optimizer showing wrong rows in plan  (Tom Lane, )
      Re: Optimizer showing wrong rows in plan  (Jeremy Harris, )
       Re: Optimizer showing wrong rows in plan  (Tom Lane, )
        Re: Optimizer showing wrong rows in plan  (Tadipathri Raghu, )
         Re: Optimizer showing wrong rows in plan  (Matthew Wakeling, )
          Re: Optimizer showing wrong rows in plan  (raghavendra t, )
           Re: Optimizer showing wrong rows in plan  (Nikolas Everett, )
 Re: Optimizer showing wrong rows in plan  (Tadipathri Raghu, )
  Re: Optimizer showing wrong rows in plan  (Frank Heikens, )
  Re: Optimizer showing wrong rows in plan  (Gary Doades, )

On 28/03/2010 10:07 AM, Tadipathri Raghu wrote:
> Hi All,
> I want to give some more light on this by analysing more like this
> 1. In my example I have created a table with one column as INT( which
> occupies 4 bytes)
> 2. Initially it occupies one page of  space on the file that is (8kb).
> So, here is it assuming these many rows may fit in this page. Clarify
> me on this Please.

Like I said, it's just a guess. With no statistics all postgres can do
is guess, or in this case use the in-built default for a newly created
table. It could guess 1 or it could guess 10,000,000. What it does is
produce a reasonable guess in the absence of any other information.

You should read the postgres documentation for further information about
statistics and how the optimizer uses them.


Regards,
Gary.




В списке pgsql-performance по дате сообщения:

От: Gary Doades
Дата:
Сообщение: Re: Optimizer showing wrong rows in plan
От: Tom Lane
Дата:
Сообщение: Re: Optimizer showing wrong rows in plan