X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 28CFDD1B437 for ; Thu, 18 Dec 2003 19:57:43 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 73381-03 for ; Thu, 18 Dec 2003 15:56:55 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 111F3D1B48D for ; Thu, 18 Dec 2003 15:56:37 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hBIJuL19022687; Thu, 18 Dec 2003 14:56:21 -0500 (EST) To: "Marinos J. Yannikos" Cc: pgsql-performance@postgresql.org Subject: Re: why do optimizer parameters have to be set manually? In-reply-to: <3FE1F5A1.6080908@geizhals.at> References: <3FE1F5A1.6080908@geizhals.at> Comments: In-reply-to "Marinos J. Yannikos" message dated "Thu, 18 Dec 2003 19:44:49 +0100" Date: Thu, 18 Dec 2003 14:56:20 -0500 Message-ID: <22686.1071777380@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/265 X-Sequence-Number: 5125 "Marinos J. Yannikos" writes: > it seems to me that the optimizer parameters (like random_page_cost > etc.) could easily be calculated and adjusted dynamically be the DB > backend based on the planner's cost estimates and actual run times for > different queries. Perhaps the developers could comment on that? No, they are not that easy to determine. In particular I think the idea of automatically feeding back error measurements is hopeless, because you cannot tell which parameters are wrong. > I'm not sure how the parameters are used internally (apart from whatever > "EXPLAIN" shows), but if cpu_operator_cost is the same for all > operators, this should probably also be adjusted for individual > operators (I suppose that ">" is not as costly as "~*"). In theory perhaps, but in practice this is far down in the noise in most situations. regards, tom lane