pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tadipathri Raghu <traghu.dba@gmail.com>
To: Szymon Guz <mabewlun@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimizer showing wrong rows in plan
Date: Sun, 28 Mar 2010 13:03:48 +0530
Message-ID: <645d9d71003280033l16069edcp45d9bbb0e7ed5517@mail.gmail.com> (raw)
In-Reply-To: <e4edc9361003280029v7174f84bo72d073aced772206@mail.gmail.com>
References: <645d9d71003272351x766707c7sadde9aa77bc1c0d3@mail.gmail.com>
	<e4edc9361003280002o627b710dhe89c98c18b5d1db3@mail.gmail.com>
	<645d9d71003280011q6cf2c6d6p7279605e6e0b4235@mail.gmail.com>
	<e4edc9361003280029v7174f84bo72d073aced772206@mail.gmail.com>

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@gmail.com> wrote:

>
>
>  2010/3/28 Tadipathri Raghu <traghu.dba@gmail.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
>
>

view thread (15+ messages)  latest in thread

Message-ID: <645d9d71003280033l16069edcp45d9bbb0e7ed5517@mail.gmail.com>
Permalink:  ../645d9d71003280033l16069edcp45d9bbb0e7ed5517@mail.gmail.com/
Also on:    postgresql.org/message-id/645d9d71003280033l16069edcp45d9bbb0e7ed5517@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: traghu.dba@gmail.com, mabewlun@gmail.com
  Subject: Re: Optimizer showing wrong rows in plan
  In-Reply-To: <645d9d71003280033l16069edcp45d9bbb0e7ed5517@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox