Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E4CDA2E0221 for ; Sun, 2 Dec 2007 19:13:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 98587-08 for ; Sun, 2 Dec 2007 19:13:10 -0400 (AST) Received: from smtp5.clear.net.nz (smtp5.clear.net.nz [203.97.33.68]) by postgresql.org (Postfix) with ESMTP id 3F65B2E01FD for ; Sun, 2 Dec 2007 19:13:10 -0400 (AST) Received: from zmori.markir.net (121-72-86-237.dsl.telstraclear.net [121.72.86.237]) by smtp5.clear.net.nz (CLEAR Net Mail) with ESMTP id <0JSG005G835WUQ10@smtp5.clear.net.nz> for pgsql-performance@postgresql.org; Mon, 03 Dec 2007 12:13:08 +1300 (NZDT) Date: Mon, 03 Dec 2007 12:13:07 +1300 From: Mark Kirkwood Subject: Re: Dealing with big tables In-reply-to: To: Mindaugas Cc: pgsql-performance@postgresql.org Message-id: <47533C03.8030900@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit References: User-Agent: Thunderbird 2.0.0.6 (X11/20071025) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/18 X-Sequence-Number: 27834 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