Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2253C632D83 for ; Sun, 28 Mar 2010 04:34:01 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 94801-02 for ; Sun, 28 Mar 2010 07:33:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vw0-f46.google.com (mail-vw0-f46.google.com [209.85.212.46]) by mail.postgresql.org (Postfix) with ESMTP id A233D633934 for ; Sun, 28 Mar 2010 04:33:50 -0300 (ADT) Received: by vws8 with SMTP id 8so2061855vws.19 for ; Sun, 28 Mar 2010 00:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=c2iVFAkS1eUz+hPCvle+cxaLz4/H1msAM3cnVU0gKw0=; b=FfRZ1GQdwOizCK4Qrb5lvO4vXGmJ+hVQlOPK47xCVetetKZnQiTZ71EiwBhFRyH/dr FGPKKLgLJeGd1a1bSZbZI1UtFHZS3jvXPpYxrKRWi/XGkPl0eTkLej7ljlcLPPvoKoto gjEWnARUDgCevdeB8Mqrwt+tm/JtahpVhMGEU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Cn+Msg+W/2rJUaUIHeMiJqasCnfhNjPF1U7BAgnhMfnxZjtf2yvYauKYgqea/oAHEQ iLL0odlo4dloYTd630JzJ3vEHx7/5r9iRuSoThlgzAClZ5ZDAPk5sl95aV0tiHGw9xei F0UZF/fAsymapC48euQgYef0bswxdWppAgh0E= MIME-Version: 1.0 Received: by 10.220.99.197 with HTTP; Sun, 28 Mar 2010 00:33:48 -0700 (PDT) In-Reply-To: References: <645d9d71003272351x766707c7sadde9aa77bc1c0d3@mail.gmail.com> <645d9d71003280011q6cf2c6d6p7279605e6e0b4235@mail.gmail.com> Date: Sun, 28 Mar 2010 13:03:48 +0530 Received: by 10.220.126.222 with SMTP id d30mr2051194vcs.78.1269761628990; Sun, 28 Mar 2010 00:33:48 -0700 (PDT) Message-ID: <645d9d71003280033l16069edcp45d9bbb0e7ed5517@mail.gmail.com> Subject: Re: Optimizer showing wrong rows in plan From: Tadipathri Raghu To: Szymon Guz Cc: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=0016e68f9f1ed87c120482d76a99 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/353 X-Sequence-Number: 38178 --0016e68f9f1ed87c120482d76a99 Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > > > 2010/3/28 Tadipathri Raghu > >> 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 > > --0016e68f9f1ed87c120482d76a99 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Guz,
=A0
It is assuming that there are 24= 00 rows in this table. Probably you've deleted some rows from the table= leaving just one.
=A0
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 whe= re we have only one in it.
Thanks if we have proper explination on this..
=A0
Regards
Raghavendra

=A0
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=A0Guz,
=A0
Thank you for the prompt reply.
=A0
No, the optimizer is not retriev= ing 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 executi= on taking into consideration all information that can be found for this tab= le (it also looks in the statistics information about rows from this table)= .
=A0
So, whats it assuming here as rows(2400).=A0 Could you explain this.
=A0


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

regards
Szymon Guz=A0


--0016e68f9f1ed87c120482d76a99--