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 4B8AB5672F for ; Tue, 22 Mar 2005 13:50:09 +0000 (GMT) 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 31964-07 for ; Tue, 22 Mar 2005 13:50:04 +0000 (GMT) Received: from floppy.pyrenet.fr (unknown [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1282D56725 for ; Tue, 22 Mar 2005 13:50:02 +0000 (GMT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 5384F30EA1; Tue, 22 Mar 2005 14:50:06 +0100 (MET) From: Christopher Browne X-Newsgroups: pgsql.performance Subject: Re: What about utility to calculate planner cost constants? Date: Tue, 22 Mar 2005 08:09:40 -0500 Organization: cbbrowne Computing Inc Lines: 30 Message-ID: References: <200503210951.06044.josh@agliodbs.com> <87acowcmut.fsf@stark.xeocode.com> 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.1007 (Gnus v5.10.7) XEmacs/21.4 (Jumbo Shrimp, linux) Cancel-Lock: sha1:3jySrWgNBkD6H+Cc4uyWWtUk074= To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.396 tagged_above=0 required=5 tests=AWL, INFO_TLD X-Spam-Level: X-Archive-Number: 200503/445 X-Sequence-Number: 11150 Martha Stewart called it a Good Thing when gsstark@mit.edu (Greg Stark) wrote: > I don't think it would be very hard at all actually. > > It's just a linear algebra problem with a bunch of independent > variables and a system of equations. Solving for values for all of > them is a straightforward problem. > > Of course in reality these variables aren't actually independent > because the costing model isn't perfect. But that wouldn't be a > problem, it would just reduce the accuracy of the results. Are you certain it's a linear system? I'm not. If it was a matter of minimizing a linear expression subject to some set of linear equations, then we could model this as a Linear Program for which there are some perfectly good solvers available. (Few with BSD-style licenses, but we could probably get some insight out of running for a while with something that's there...) I think there's good reason to consider it to be distinctly NON-linear, which makes it way more challenging to solve the problem. There might well be some results to be gotten out of a linear approximation; the Grand Challenge is to come up with the model in the first place... -- wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','gmail.com'). http://linuxdatabases.info/info/or.html "Tom Christiansen asked me, "Chip, is there anything that you like that isn't big and complicated?" C++, EMACS, Perl, Unix, English-no, I guess not." -- Chip Salzenberg, when commenting on Perl6/C++