Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 90E151337BE2 for ; Fri, 25 Mar 2011 06:43:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 82405-10 for ; Fri, 25 Mar 2011 09:42:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com [209.85.161.46]) by mail.postgresql.org (Postfix) with ESMTP id 5962A133798E for ; Fri, 25 Mar 2011 06:42:54 -0300 (ADT) Received: by fxm17 with SMTP id 17so994672fxm.19 for ; Fri, 25 Mar 2011 02:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=CSiR3KS5fi2nM74mKdlthBUrLnKqtdENl1k2I/404Pk=; b=FOpm5Ouzhl2oWxmS9Yia5huU37F/pU9TFYMd8UuH1C8VmXlZ9oTzTrsN8huj7HCCPC 1+i1RBf3Lvs1qfXRG8YRARy7QCrwW5PyB0BH5kldIkVeORHOgBErZLLhWJKfKh6T005k kEQlMiakje8xdAG+pjVCGCfRaRw6rCTNFD2rk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=WGqjXUSyWDE40Dcjsu4eCF1wYPcZ/PsCe3dGg5Pi0N/vXuKO9cJBcXFacQOqkx8FV4 CCNtfMm6YdimiwMIyzFhF5NxDzb7mUqFpSflICcljQS+qfFjLamDgDfeRuAu2uBKlgO4 joojJtwpRf0hn0AV17aw9bQGXzGL569QYKOKo= Received: by 10.223.95.135 with SMTP id d7mr629147fan.65.1301046173312; Fri, 25 Mar 2011 02:42:53 -0700 (PDT) Received: from [10.1.1.57] (skuns.zoral.com.ua [91.193.166.194]) by mx.google.com with ESMTPS id e17sm321457fak.0.2011.03.25.02.42.50 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Mar 2011 02:42:51 -0700 (PDT) Message-ID: <4D8C63B2.1060800@gmail.com> Date: Fri, 25 Mar 2011 11:43:14 +0200 From: Vitalii Tymchyshyn User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: Merlin Moncure CC: Tom Lane , Claudio Freire , Josh Berkus , postgres performance list Subject: Re: Shouldn't we have a way to avoid "risky" plans? References: <4D8A29F2.9080105@agliodbs.com> <4D8A581D.5080704@agliodbs.com> <4286.1300914004@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.046 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201103/329 X-Sequence-Number: 43008 24.03.11 20:41, Merlin Moncure написав(ла): > 2011/3/24 В╕тал╕й Тимчишин: >> >> This can se GUC-controllable. Like plan_safety=0..1 with low default value. >> This can influence costs of plans where cost changes dramatically with small >> table changes and/or statistics is uncertain. Also this can be used as >> direct "hint" for such dangerous queries by changing GUC for session/single >> query. > ISTM if you add statistics miss and 'risk margin' to the things the > planner would have to consider while generating a plan, you are > greatly increasing the number of plan paths that would have to be > considered for any non trivial query. Why so? I simply change cost estimation functions. This won't change number of pathes. Best regards, Vitalii Tymchyshyn.