Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 483259F9461 for ; Mon, 24 Sep 2007 19:01:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 19027-07 for ; Mon, 24 Sep 2007 19:00:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from outmail129173.authsmtp.com (outmail129173.authsmtp.com [62.13.129.173]) by postgresql.org (Postfix) with ESMTP id 077B69F947B for ; Mon, 24 Sep 2007 19:01:09 -0300 (ADT) Received: from outmail128185.authsmtp.co.uk (outmail128185.authsmtp.co.uk [62.13.128.185]) by punt3.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id l8OM16jf028626; Mon, 24 Sep 2007 23:01:07 +0100 (BST) Received: from [192.168.0.3] (85-211-149-22.dyn.gotadsl.co.uk [85.211.149.22]) (authenticated bits=0) by mail.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id l8OM14gh032588; Mon, 24 Sep 2007 23:01:04 +0100 (BST) Subject: Re: wholly / partially table read into shared buffer From: Simon Riggs To: =?UTF-8?Q?=D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D0=B8=D0=B9_?= =?UTF-8?Q?=D0=A2=D0=B8=D1=82=D0=BE=D0=B2?= Cc: pgsql-admin@postgresql.org In-Reply-To: <42071190300869@webmail27.yandex.ru> References: <42071190300869@webmail27.yandex.ru> Content-Type: text/plain; charset=utf-8 Date: Mon, 24 Sep 2007 22:59:45 +0100 Message-Id: <1190671185.4181.236.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 8bit X-Server-Quench: a5534961-6ae9-11dc-b86a-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFagFbflxB HGQLW1NEUl57WWJ/ aw4fZQBDYEtPQQRu WVZLQE1QERpoT0AJ eWMfVk4qdwZEfXZ4 K0dgXnMVDUF/dkJ0 RE9JEzxTbHphaTRM TRJQcVJJcANLfxdA PlN4UyBcLwdSbGoL NiMWHhYEdSpfLyBR U0lKZUobW1oKFzo4 VlgeFD8rEAUfSiw/ Zx0gNllUB0YYKEg+ eVE8V1wVKXdp X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:752/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/145 X-Sequence-Number: 26906 On Thu, 2007-09-20 at 19:07 +0400, Григорий Титов wrote: > I am newbie in Postgres, but previously worked with Oracle. Now I am > puzzled with heap_blks_hit/heap_blks_read ratio. I make select from > table (whose size is larger than shared_buffer) and saw that it was > wholly read from disk after second, third and so on runs. Isn't is > wrong that RDBMS tries to cache table data blocks at least PARTIALLY > in the case of insufficient cache buffer? It does cache partially, but its always the wrong part of the table. BTQ, Oracle does that too... -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com