reorder table data

From: "vinita bansal" <sagivini(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: reorder table data
Date: 2005-04-19 17:13:03
Message-ID: BAY20-F185EAD00E286B2A5340C3BCB2A0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-04-19 17:14:44 Re: Datatypes in PL/PSQL functions with multiple arguments
Previous Message Michael Fuhr 2005-04-19 17:10:16 Re: substring and POSIX re's