pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: michal.zaborowski@gmail.com
To: pgsql-admin@postgresql.org
Subject: Re: wholly / partially table read into shared buffer
Date: Fri, 28 Sep 2007 11:37:07 -0000
Message-ID: <1190979427.877871.198750@50g2000hsm.googlegroups.com> (raw)
In-Reply-To: <1190671185.4181.236.camel@ebony.site>
References: <42071190300869@webmail27.yandex.ru>
	<1190671185.4181.236.camel@ebony.site>

On 24 Wrz, 23:59, si...@2ndquadrant.com (Simon Riggs) wrote:
> 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.
>
Let's say - you have very big table. Even if you are querying data
with index -
table read will be done... If your queries are quite randomly hitting
table pages -
you *will* see that effect. You can think about partitions - idea
looks good -
you can save some IO bandwidth paying with processor time. Partitions
can
help if you do seq-scans, but... with index scans and heap_blks_hit -
does not.
Instead you can prepare 'index cluster' a specially when there are not
too many
writes...

--
Regards,
  Micha  Zaborowski (TeXXaS)




view thread (3+ messages)

Message-ID: <1190979427.877871.198750@50g2000hsm.googlegroups.com>
Permalink:  ../1190979427.877871.198750@50g2000hsm.googlegroups.com/
Also on:    postgresql.org/message-id/1190979427.877871.198750@50g2000hsm.googlegroups.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-admin@postgresql.org
  Cc: michal.zaborowski@gmail.com
  Subject: Re: wholly / partially table read into shared buffer
  In-Reply-To: <1190979427.877871.198750@50g2000hsm.googlegroups.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