X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A74CC9FB376 for ; Fri, 22 Sep 2006 14:46:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 98200-07 for ; Fri, 22 Sep 2006 14:46:15 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.234]) by postgresql.org (Postfix) with ESMTP id 631F59FB50E for ; Fri, 22 Sep 2006 14:13:43 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 55so592242wri for ; Fri, 22 Sep 2006 10:13:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=nl3Q8dIj9tYZ6RbbSsZWNpX4uSIwYkDyRHSir5pOs8bv2IVb1OBSoiFzJC0UqYnRuJBSouLf/rMQypkA4Akf8s8vooI+sLYKSPgAE9H/oPlWSFf5vr26xk7rU95G8ycjt0R3TLwg9fkc4XcUrfR5ytH5UA7cfSyYl8v6lPLi/so= Received: by 10.90.51.17 with SMTP id y17mr588135agy; Fri, 22 Sep 2006 10:13:42 -0700 (PDT) Received: by 10.90.49.6 with HTTP; Fri, 22 Sep 2006 10:13:41 -0700 (PDT) Message-ID: <33c6269f0609221013g658e19b0lfe57e392c77cf6d0@mail.gmail.com> Date: Fri, 22 Sep 2006 13:13:41 -0400 From: "Alex Turner" To: "Tom Lane" Subject: Re: Confusion and Questions about blocks read Cc: "Pgsql-Performance ((E-mail))" In-Reply-To: <780.1158942275@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12996_3958393.1158945221898" References: <33c6269f0609220834x6c10db9xa40d6121825dfd14@mail.gmail.com> <780.1158942275@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.455 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, HTML_50_60, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/304 X-Sequence-Number: 20990 ------=_Part_12996_3958393.1158945221898 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline ahh.... good point Thanks On 9/22/06, Tom Lane wrote: > > "Alex Turner" writes: > > Home come the query statistics showed that 229066 blocks where read > given > > that all the blocks in all the tables put together only total 122968? > > You forgot to count the indexes. Also, the use of indexscans in the > mergejoins probably causes multiple re-reads of some table blocks, > depending on just what the physical ordering of the rows is. > > regards, tom lane > ------=_Part_12996_3958393.1158945221898 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline ahh.... good point

Thanks

On 9/22/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Alex Turner" <armtuk@gmail.com> writes:
> Home come the query statistics showed that 229066 blocks where read given
> that all the blocks in all the tables put together only total 122968?

You forgot to count the indexes.  Also, the use of indexscans in the
mergejoins probably causes multiple re-reads of some table blocks,
depending on just what the physical ordering of the rows is.

                        regards, tom lane

------=_Part_12996_3958393.1158945221898--