Re: Optimizer showing wrong rows in plan

From: Tadipathri Raghu <traghu(dot)dba(at)gmail(dot)com>
To: Szymon Guz <mabewlun(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Optimizer showing wrong rows in plan
Date: 2010-03-28 07:33:48
Message-ID: 645d9d71003280033l16069edcp45d9bbb0e7ed5517@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi Guz,

> It is assuming that there are 2400 rows in this table. Probably you've
> deleted some rows from the table leaving just one.

Frankly speaking its a newly created table without any operation on it as
you have seen the example. Then how come it showing those many rows where we
have only one in it.
Thanks if we have proper explination on this..

Regards
Raghavendra

On Sun, Mar 28, 2010 at 12:59 PM, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:

>
>
> 2010/3/28 Tadipathri Raghu <traghu(dot)dba(at)gmail(dot)com>
>
>> Hi Guz,
>>
>> Thank you for the prompt reply.
>>
>>
>>> No, the optimizer is not retrieving anything, it just assumes that there
>>> are 2400 rows because that is the number of rows that exists in the
>>> statictics for this table. The optimizer just tries to find the best plan
>>> and to optimize the query plan for execution taking into consideration all
>>> information that can be found for this table (it also looks in the
>>> statistics information about rows from this table).
>>
>>
>> So, whats it assuming here as rows(2400). Could you explain this.
>>
>>
>>
> It is assuming that there are 2400 rows in this table. Probably you've
> deleted some rows from the table leaving just one.
>
> regards
> Szymon Guz
>
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tadipathri Raghu 2010-03-28 09:07:13 Re: Optimizer showing wrong rows in plan
Previous Message Szymon Guz 2010-03-28 07:29:46 Re: Optimizer showing wrong rows in plan