X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7F1E3329E91 for ; Wed, 15 Sep 2004 04:37:12 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 40942-01 for ; Wed, 15 Sep 2004 03:37:03 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 8EEFD329CDB for ; Wed, 15 Sep 2004 04:37:03 +0100 (BST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i8F3axCt040972 for ; Wed, 15 Sep 2004 03:37:02 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i8F3Y9sM040341 for pgsql-performance@postgresql.org; Wed, 15 Sep 2004 03:34:09 GMT From: Christopher Browne X-Newsgroups: comp.databases.postgresql.performance Subject: Re: Data Warehouse Reevaluation - MySQL vs Postgres -- merge tables Date: Tue, 14 Sep 2004 23:33:49 -0400 Organization: cbbrowne Computing Inc Lines: 27 Message-ID: References: <20040914223333.GL56059@decibel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:UaTkqIHblGpHjV0yZ3T3QN7XDVw= To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/131 X-Sequence-Number: 8259 simon@2ndquadrant.com ("Simon Riggs") wrote: > The main point is that the constant placed in front of each table > must in some way relate to the data, to make it useful in > querying. If it is just a unique constant, chosen at random, it > won't do much for partition elimination. It just struck me - this is much the same notion as that of "cutting planes" used in Integer Programming. The approach, there, is that you take a linear program, which can give fractional results, and throw on as many additional constraints as you need in order to force the likelihood of particular variable falling on integer values. The constraints may appear redundant, but declaring them allows the answers to be pushed in the right directions. In this particular case, the (arguably redundant) constraints let the query optimizer have criteria for throwing out unnecessary tables. Thanks for pointing this out; it may turn a fowl into a feature, when I can get some "round tuits" :-). That should allow me to turn an 81-way evil join into something that's 4-way at the worst. Cheers! -- "cbbrowne","@","linuxfinances.info" http://linuxfinances.info/info/nonrdbms.html Implementing systems is 95% boredom and 5% sheer terror.