Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 996E26322E8 for ; Sun, 11 Apr 2010 19:44:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 68177-08 for ; Sun, 11 Apr 2010 22:43:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mail.postgresql.org (Postfix) with ESMTP id CE56762F118 for ; Sun, 11 Apr 2010 19:44:04 -0300 (ADT) Received: by bwz8 with SMTP id 8so2436605bwz.3 for ; Sun, 11 Apr 2010 15:44:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=BCwB7SgoTKnlDHGEHXhm0ZHSBkhWL12duVZkCbB/JWo=; b=StjKMunepqLbOpvotjiaOoUvngiHymN7moYpkvSl6+RybSG0+TJU24kIGrY9Tbt60h KATb/Sp7TSXJp9XSI65YY994pRUDqWZdt2YnWWxrbrjsIuksijKbKcw47ppRzbhH/JDJ tne0Zg/hz3G3mQHes69djanaCK9F9XXj1xNTs= 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=vyyNzYVsfYp8L0uBNl2m8uhodi5s6S4P5dU/ePhNBNqOXrfXOZTXWFdkYskyc9ovDm CooCoAAsHtB7t3zEuZcKhIgzEELWook0Xdx8oVD1ZvKd1Wj1dQPZxtq8fGdzIZtIdKks 6OqCWLL5oMtLEpyM/ZKu9WcRXieu5ez3h3jvI= Received: by 10.204.21.17 with SMTP id h17mr1397388bkb.197.1271025843111; Sun, 11 Apr 2010 15:44:03 -0700 (PDT) Received: from [192.168.1.20] (HSI-KBW-082-212-034-242.hsi.kabelbw.de [82.212.34.242]) by mx.google.com with ESMTPS id 16sm1472213bwz.13.2010.04.11.15.44.02 (version=SSLv3 cipher=RC4-MD5); Sun, 11 Apr 2010 15:44:02 -0700 (PDT) Message-ID: <4BC250B1.5010301@gmail.com> Date: Mon, 12 Apr 2010 00:44:01 +0200 From: Corin User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Luke Lonergan CC: pgsql-performance@postgresql.org Subject: Re: planer chooses very bad plan References: <2106D8DC89010842BABA5CD03FEA4061016617EAF9@EXVMBX018-10.exch018.msoutlookonline.net> In-Reply-To: <2106D8DC89010842BABA5CD03FEA4061016617EAF9@EXVMBX018-10.exch018.msoutlookonline.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.583 tagged_above=-10 required=5 tests=AWL=-0.583 X-Spam-Level: X-Archive-Number: 201004/144 X-Sequence-Number: 38394 On 11.04.2010 23:22, Luke Lonergan wrote: > Try random_page_cost=100 > Increasing random_page_const to 100 (it was 2.5 before) did not help, but lowering it <=1.5 helped. As almost the whole dataset fit's into memory, I think I'll change it permanently to 1.5 (seq_page is 1.0). I'll also increase the default_statistics to 1000, because this also seems to help a lot. Thanks, Corin