Re: Dealing with big tables

From: Matthew <matthew(at)flymine(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Dealing with big tables
Date: 2007-12-03 10:35:27
Message-ID: Pine.LNX.4.58.0712031032220.3731@aragorn.flymine.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, 3 Dec 2007, Mark Kirkwood wrote:

> > And I cannot use some index organized table or table partitioned by
> > From :) because there are at least 2 similar indexes by which queries
> > can be executed - From and To.

> This makes things a bit tough. One trick is to vertically partition the
> table into two new tables - with "From" in one and "To" in the other...
> then you can (horizontally) partition or cluster on each of these
> columns separately.

Or you could even commit a capital sin and have several copies of the same
table, sorted by different columns. Just remember to select from the
correct table to get the performance, and to write all changes to all the
tables! Kind of messes up transactions and locking a little though.

Matthew

--
No, C++ isn't equal to D. 'C' is undeclared, so we assume it's an int,
with a default value of zero. Hence, C++ should really be called 1.
-- met24, commenting on the quote "C++ -- shouldn't it be called D?"

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Paul Lindner 2007-12-03 16:12:22 Re: Training Recommendations
Previous Message Tom Lane 2007-12-03 01:10:25 Re: EXPLAIN ANALYZE time calculations