pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: Boszormenyi Zoltan <zb@cybertec.at>
Cc: Noah Misch <noah@leadboat.com>
Cc: Michael Meskes <meskes@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PG Hackers <pgsql-hackers@postgresql.org>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Bruce Momjian <bruce@momjian.us>
Subject: Re: ECPG FETCH readahead
Date: Tue, 17 Apr 2012 05:52:08 +0200
Message-ID: <20120417035208.GA5465@feivel.credativ.lan> (raw)
In-Reply-To: <4F8C544F.4080708@cybertec.at>
References: <4F81BE55.1010904@cybertec.at>
	<20120408173859.GA4915@feivel.credativ.lan>
	<4F83E2B9.3030302@cybertec.at>
	<20120410143722.GC6129@tornado.leadboat.com>
	<20120410145501.GA11554@feivel.credativ.lan>
	<4F847453.9060200@cybertec.at>
	<20120416024636.GA4536@feivel.credativ.lan>
	<4F8B9F19.3040403@cybertec.at>
	<20120416160448.GA9968@feivel.credativ.lan>
	<4F8C544F.4080708@cybertec.at>

On Mon, Apr 16, 2012 at 07:18:07PM +0200, Boszormenyi Zoltan wrote:
> OK. I would like to stretch your agreement a little. :-)
> ...

Yeah, you got a point here.

> By the new FETCH request. Instead of the above, I imagined this:
> - the runtime notices that the new request is larger than the current
>   readahead window size, modifies the readahead window size upwards,
>   so the next FETCH will use it
> - serve the request's first 128 rows from the current cache
> - for the 129th row, FETCH 1024 will be executed and the remaining
>   768 rows will be served from the new cache

That means window size goes up to 1024-128 for that one case?

> - all subsequent requests use the new readahead size, 1024

Sounds reasonable to me.

> So, there can be occasional one-time larger requests but
> smaller ones should apply the set window size, right?

Yes. I do agree that FETCH N cannot fetch N all the time, but please make it
work like what you suggested to make sure people don't have to recompile.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at googlemail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL



view thread (69+ messages)  latest in thread

Message-ID: <20120417035208.GA5465@feivel.credativ.lan>
Permalink:  ../20120417035208.GA5465@feivel.credativ.lan/
Also on:    postgresql.org/message-id/20120417035208.GA5465@feivel.credativ.lan

 · 

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-hackers@postgresql.org
  Cc: meskes@postgresql.org, zb@cybertec.at, noah@leadboat.com, robertmhaas@gmail.com, heikki.linnakangas@enterprisedb.com, bruce@momjian.us
  Subject: Re: ECPG FETCH readahead
  In-Reply-To: <20120417035208.GA5465@feivel.credativ.lan>

* 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