Re: CLUSTER and indisclustered - Mailing list pgsql-hackers

From Curt Sampson
Subject Re: CLUSTER and indisclustered
Date
Msg-id Pine.NEB.4.44.0208071126590.1214-100000@angelic.cynic.net
Whole thread Raw
In response to Re: CLUSTER and indisclustered  (mark Kirkwood <markir@slithery.org>)
Responses Re: CLUSTER and indisclustered  (Gavin Sherry <swm@linuxworld.com.au>)
Re: CLUSTER and indisclustered  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: CLUSTER and indisclustered  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
On Sun, 4 Aug 2002, mark Kirkwood wrote:

> Ok, this change would save you the initial access of the index
> structure itself - but isnt the usual killer for indexes is the
> "thrashing" that happens when the "pointed to" table data is spread
> over a many pages.

Yeah, no kidding on this one. I've reduced queries from 75 seconds
to 0.6 seconds by clustering on the appropriate field.

But after doing some benchmarking of various sorts of random reads
and writes, it occurred to me that there might be optimizations
that could help a lot with this sort of thing. What if, when we've
got an index block with a bunch of entries, instead of doing the
reads in the order of the entries, we do them in the order of the
blocks the entries point to? That would introduce a certain amount
of "sequentialness" to the reads that the OS is not capable of
introducing (since it can't reschedule the reads you're doing, the
way it could reschedule, say, random writes).

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org   Don't you know, in this new Dark Age, we're
alllight.  --XTC
 



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: contrib/ltree
Next
From: Bruce Momjian
Date:
Subject: Re: [COMMITTERS] pgsql-server/src backend/tcop/postgres.c