Re: reorder table data - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: reorder table data
Date
Msg-id 42654D02.6090909@commandprompt.com
Whole thread Raw
In response to Re: reorder table data  (Richard Huxton <dev@archonet.com>)
Responses Re: reorder table data  ("vinita bansal" <sagivini@hotmail.com>)
List pgsql-general
Richard Huxton wrote:
> vinita bansal wrote:
>
>> 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.
>
>
> Is there some pattern to which data is being accessed. For example, in
> an accounts system it might be rows with paid=false.

If the above is the case you could create an expression index
specifically for your clause.

You could also archive out the old information into another schema and
access it when required using UNIONS.

Sincerely,

Joshua D. Drake
Command Prompt, Inc.

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedication Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: reorder table data
Next
From: Tom Lane
Date:
Subject: Re: Simplified (a-la [G|N]DBM) DB access