Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 8AE539F9F47 for ; Tue, 26 Dec 2006 14:59:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 44042-01 for ; Tue, 26 Dec 2006 14:58:48 -0400 (AST) X-Greylist: delayed 00:21:59.851783 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 57D6B9FA097 for ; Tue, 26 Dec 2006 14:58:50 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from sipala.earlham.edu (sipala.earlham.edu [159.28.1.75]) by svr4.postgresql.org (Postfix) with ESMTP id 398B05AF04F for ; Tue, 26 Dec 2006 18:36:50 +0000 (GMT) Received: from ec454.lly.earlham.edu (ec454.lly.earlham.edu [159.28.7.5]) (authenticated bits=0) by sipala.earlham.edu (8.13.6/8.13.6) with ESMTP id kBQIahGN003620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 26 Dec 2006 13:36:48 -0500 (EST) Message-ID: <45916BBB.5070602@earlham.edu> Date: Tue, 26 Dec 2006 13:36:43 -0500 From: Kevin Hunter User-Agent: Thunderbird 2.0b1 (Macintosh/20061206) MIME-Version: 1.0 To: PostrgreSQL Novice List Subject: Partitioning Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.07 tagged_above=0 required=5 tests=BAYES_50, SPF_NEUTRAL X-Spam-Level: * X-Archive-Number: 200612/98 X-Sequence-Number: 18192 Hi All, A friend has asked me about creating a unique table for individual users that sign up for his site. (In essence, each user who signs up would essentially get a set of CREATE TABLE {users,friends,movies,eats}_ ( ... ); statements executed, the idea being to reduce the number of rows that the DB needs to search or index/update in regards to a particular user id.) The just seems ludicrous to me, because the database still needs to find those tables from its internal structure, not to mention that it just seems silly to me from a design perspective. Something about unable to optimize any queries because not only is the WHERE clause in flux, but so is the FROM clause. Question: Could someone explain to me why this would be bad idea, because I can't put into words why it is. Or is it a good idea? (Towards learning, I'm looking for a technical, Postgres oriented answer, as well as the more general answer.) Since he's worried about performance, methinks a better idea would be to use the partitioning support of Postgres. Is this a good hunch? (Side question: When did Postgres get partitioning support? I see it referenced in the 8.1 documentation but not before.) Thanks, Kevin