pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron Johnson <ron.l.johnson@cox.net>
To: PgSQL Performance ML <pgsql-performance@postgresql.org>
Subject: Re: 7.3.1 New install, large queries are slow
Date: 27 Jan 2003 09:17:28 -0600
Message-ID: <1043680648.9896.24.camel@haggis> (raw)
In-Reply-To: <Pine.NEB.4.51.0301271926400.393@angelic.cynic.net>
References: <Pine.BSF.4.44.0301171336180.56567-100000@torgo.978.org>
	<21623.1042865371@sss.pgh.pa.us>
	<20030127081745.GK15936@perrin.int.nxad.com>
	<Pine.NEB.4.51.0301271926400.393@angelic.cynic.net>

On Mon, 2003-01-27 at 04:34, Curt Sampson wrote:
> On Mon, 27 Jan 2003, Sean Chittenden wrote:
> 
> >     The FreeBSD VM caching system does prevent one process from exhausting
> >     another process's cached data due to a sequential access, but the
> >     FreeBSD VM cache does not try to outsmart sequential data accesses to
> >     datasets which are larger then available cache space because it's an
> >     insanely difficult (impossible) problem to solve properly without
> >     foreknowledge of what data elements will be accessed when.
> 
> This is not impossible; Solaris does just this. I'm a little short of

Quite.  One way to do it is:
- the OS notices that process X has been sequentially reading thru 
  file Y for, say, 3 seconds.
- the OS knows that X is currently at the mid-point of file Y
- OS says, "Hey, I think I'll be a bit more agressive about, when I
  have a bit of time, trying to read Y faster than X is requesting
  it

It wouldn't work well, though, in a client-server DB like Postgres,
which, in a busy multi-user system, is constantly hitting different
parts of different files.

The algorithm, though, is used in the RDBMS Rdb.  It uses the algorithm
above, substituting "process X" for "client X", and passes the agressive
reads of Y on to the OS.  It's a big win when processing a complete
table, like during a CREATE INDEX, or  "SELECT foo, COUNT(*)" where
there's no index on foo.

-- 
+---------------------------------------------------------------+
| Ron Johnson, Jr.        mailto:ron.l.johnson@cox.net          |
| Jefferson, LA  USA      http://members.cox.net/ron.l.johnson  |
|                                                               |
| "Fear the Penguin!!"                                          |
+---------------------------------------------------------------+




view thread (66+ messages)  latest in thread

Message-ID: <1043680648.9896.24.camel@haggis>
Permalink:  ../1043680648.9896.24.camel@haggis/
Also on:    postgresql.org/message-id/1043680648.9896.24.camel@haggis

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: ron.l.johnson@cox.net
  Subject: Re: 7.3.1 New install, large queries are slow
  In-Reply-To: <1043680648.9896.24.camel@haggis>
  References: <Pine.BSF.4.44.0301171336180.56567-100000@torgo.978.org> <21623.1042865371@sss.pgh.pa.us> <20030127081745.GK15936@perrin.int.nxad.com> <Pine.NEB.4.51.0301271926400.393@angelic.cynic.net> <1043680648.9896.24.camel@haggis>

* 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