reorder table data - Mailing list pgsql-general

From vinita bansal
Subject reorder table data
Date
Msg-id BAY20-F185EAD00E286B2A5340C3BCB2A0@phx.gbl
Whole thread Raw
Responses Re: reorder table data  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Hi,

I have a 40GB database with a few tables containing approx 10 million rows.
Most of the data in these tables is inactive and there is only a few rows
which get used for our benchmark run each day. We cannot delete the inactive
data since it might be required for a particular run some day while it is
active data that is used mostly. Problem here is that the update and select
queries are very slow becuase of this background data. I am looking for some
way to reorganize the data in such a way that the active data gets accessed
much faster as compared to inactive data. I am using btree indices which
assumes that all the rows have the same probability. Is there an index or
some other way to order this data so that active data can be accessed most
efficiently (want to reduce the effect of background data as much as
possible).??

Also, what is the best way to find out which rows are getting accessed in a
table for a particular run??

Regards,
Vinita Bansal

_________________________________________________________________
Find,Compare,Buy & Sell!
http://adfarm.mediaplex.com/ad/ck/4686-26272-10936-265?ck=Register Do it all
on eBay!


pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: substring and POSIX re's
Next
From: Richard Huxton
Date:
Subject: Re: Datatypes in PL/PSQL functions with multiple arguments