pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Kirkwood <markir@paradise.net.nz>
To: Mindaugas <ml@kilimas.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Dealing with big tables
Date: Mon, 03 Dec 2007 12:13:07 +1300
Message-ID: <47533C03.8030900@paradise.net.nz> (raw)
In-Reply-To: <E1Iym1h-0004Tg-VQ@garm.runbox.com>
References: <E1Iym1h-0004Tg-VQ@garm.runbox.com>

Mindaugas 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.

You can make it reasonably transparent by using a view to combine the 
columns again to get something that looks like the original table.

Cheers

Mark



view thread (9+ messages)  latest in thread

Message-ID: <47533C03.8030900@paradise.net.nz>
Permalink:  ../47533C03.8030900@paradise.net.nz/
Also on:    postgresql.org/message-id/47533C03.8030900@paradise.net.nz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: markir@paradise.net.nz, ml@kilimas.com
  Subject: Re: Dealing with big tables
  In-Reply-To: <47533C03.8030900@paradise.net.nz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox