Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6D7DB1337BC2 for ; Fri, 4 Feb 2011 10:38:48 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 32313-06-3 for ; Fri, 4 Feb 2011 14:38:36 +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 6CF221337BD9 for ; Fri, 4 Feb 2011 10:38:29 -0400 (AST) Received: by fxm20 with SMTP id 20so2476043fxm.19 for ; Fri, 04 Feb 2011 06:38:30 -0800 (PST) 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=y1QR1Vr8kTgdqvNWdhUknTbjMc98SyV00Qo0SCWgFpc=; b=SLv5/EkSAXkMF78RyDRDgQZGhYW+qlnGiVQT8fyzDRTTDL8kVUpbTWHVr0pjB1+jP6 c2Q3DB1VfsLCpP0rm4D+N0CfkbslFDbzyZb383gX+Wg/zH9koHiiaRuIaRdc1qjxmyMg JDcul3yG46svpwCDLC1ZJS/Bca7OjzzTgDXU0= 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=MpHXqO6yTl22Rcwqf2DtxAhl77geQUxOTx3S8Sgl5sGvgO/90pb4NkkIPY8yaEN8G2 oWMazv/rxY5BGRu3gz8k68vERDVERMQc1UZ+WeqeMvnQ/3F6hehoIpqDtVvw4Zx0k0mO JK1rI8dUJ9jTuGJQlRyhbT1O7ZsYMsH7zUfqg= Received: by 10.223.86.140 with SMTP id s12mr11414330fal.145.1296830310044; Fri, 04 Feb 2011 06:38:30 -0800 (PST) Received: from [10.1.1.57] (skuns.zoral.com.ua [91.193.166.194]) by mx.google.com with ESMTPS id e6sm256070fav.8.2011.02.04.06.38.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 04 Feb 2011 06:38:28 -0800 (PST) Message-ID: <4D4C0F66.1080507@gmail.com> Date: Fri, 04 Feb 2011 16:38:30 +0200 From: Vitalii Tymchyshyn User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Kenneth Marshall CC: david@lang.hm, Robert Haas , Jon Nelson , Mladen Gogala , Andrew Dunstan , Bruce Momjian , Tom Lane , Craig Ringer , "pgsql-performance@postgresql.org" Subject: Re: [HACKERS] Slow count(*) again... References: <4D499E55.4020107@vmsinfo.com> <4D4A7B69.2020704@gmail.com> <20110204143315.GA1261@aart.is.rice.edu> In-Reply-To: <20110204143315.GA1261@aart.is.rice.edu> Content-Type: text/plain; charset=UTF-8; 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: 201102/185 X-Sequence-Number: 42323 04.02.11 16:33, Kenneth Marshall написав(ла): > > In addition, the streaming ANALYZE can provide better statistics at > any time during the load and it will be complete immediately. As far > as passing the entire table through the ANALYZE process, a simple > counter can be used to only send the required samples based on the > statistics target. Where this would seem to help the most is in > temporary tables which currently do not work with autovacuum but it > would streamline their use for more complicated queries that need > an analyze to perform well. > Actually for me the main "con" with streaming analyze is that it adds significant CPU burden to already not too fast load process. Especially if it's automatically done for any load operation performed (and I can't see how it can be enabled on some threshold). And you can't start after some threshold of data passed by since you may loose significant information (like minimal values). Best regards, Vitalii Tymchyshyn