Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeQp9-0008Vl-CE for pgsql-performance@arkaria.postgresql.org; Mon, 20 May 2013 14:12:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UeQp8-000116-TC for pgsql-performance@arkaria.postgresql.org; Mon, 20 May 2013 14:12:26 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeQp7-000110-AS for pgsql-performance@postgresql.org; Mon, 20 May 2013 14:12:25 +0000 Received: from nm16.bullet.mail.bf1.yahoo.com ([98.139.212.175]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UeQp4-0006ud-DR for pgsql-performance@postgresql.org; Mon, 20 May 2013 14:12:24 +0000 Received: from [98.139.212.144] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 20 May 2013 14:12:21 -0000 Received: from [98.139.215.252] by tm1.bullet.mail.bf1.yahoo.com with NNFMP; 20 May 2013 14:12:20 -0000 Received: from [127.0.0.1] by omp1065.mail.bf1.yahoo.com with NNFMP; 20 May 2013 14:12:20 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 904413.15029.bm@omp1065.mail.bf1.yahoo.com Received: (qmail 16988 invoked by uid 60001); 20 May 2013 14:12:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1369059140; bh=Hqfm+qDa6NK0Z7Bv8zLyTjnDo3qjxej/biToKQtVQ1Q=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ewnHbFoyoiyHXu7FqYYsDOIz+ixB867jpqf7al8tryEWZyWlp+8nsbkh+hzfaURafwbV25Xp19bo9KmD7NkK2fIfLuwk6IUKF5FXigzAZQ1olLCp67lkJieAR67bJqX5MGR7OWfzD2UXVjAGEKD0tzEPToOW0CUG2ng27HArzu8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=WtnFmKBhZ9gl4D4thumwsjL3t7Zr9mjbj20tijUmoij5tsVdBk70ZvPhS70Nbdcph4XrKXFS5olPgvGkZpuu3raBmWvRUIU0uFP7eRqPnrh9qHwkXuXOmCAWhQ1ycGYr6mnZigQo+wZ+yd3mJKPghslMSkcQl4YYw3+ZNyoK/hA=; X-YMail-OSG: nR5dFiMVM1max4naoJvd3K46ABj72F4aOG1Dnil.5ztieIG umm2KndZ6YB3lHNktZHPncl.lBEKJ_NgLHjmcbPsEE3rhj3EaBSXk3jR3O2R OW5wtBgBFAL5qF9qOKaVWZjBMX6xXDMJR7RLomoGpbjhp9l6fwpYq2m.ZfU1 31HxfCw3n2JJEO6tWN28m5yTTHjYNuzXDRva9X2F8awqIUU9J2KyLLPhSUY2 97XiRxIMTPB5tIpKf6LJoDFsf0MsdutnTZ76Y2KzSMmbhF1PJLpRufBNhPfd dqO_haGclWSw71K0WPJ5i_9RhnLL8FKizqTVNBggzO_.gG7H5JFcW_UiX3l3 EmBsri0eeQwu8rYpgyxpPZ05RE6fURGowQ2uRC2KxkW2rbWMzIXi5sQrL_in 6.Z0Bmrb5WuK4kJlMBhAdaAmnMO79yiukJZQTcFNkrt6bvbagMGOJutkYavu hHOh.ewtqS1v3cNqxHBXMghWsdewSjvAR5DcNYDl.soHfLnBqn0B9jvxMoyk r_xkU8Q9RA0rqlBYPRyni3C4_Nd1yLU0BQWQebqu1FLaNGpJm.M8- Received: from [76.255.18.237] by web162906.mail.bf1.yahoo.com via HTTP; Mon, 20 May 2013 07:12:20 PDT X-Rocket-MIMEInfo: 002.001, YWNoIDxhbGFuY2hpbmVzQGdtYWlsLmNvbT4gd3JvdGU6Cgo.IE9uZSBxdWljayBmb2xsb3cgdXAgc2luY2UgSSdtIGV4cGVjdGluZyB5J2FsbCBtaWdodCBrbm93OsKgIERvIHRoZQo.IHN0YXRpc3RpY3MgdGFyZ2V0cyBhY3R1YWxseSBzcGVlZCBwZXJmb3JtYW5jZSBvbiBhbiBpbmRleCBzZWFyY2gKPiBpdHNlbGY7IHRoZSBhY3R1YWwgbG9va3VwP8KgIE9yIGFyZSB0aGUgSlVTVCB0byBpbmZvcm0gdGhlIHBsYW5uZXIKPiB0b3dhcmRzIHRoZSBiZXN0IHBhdGh3YXkgZGVjaXNpb24_CgpTaW5jZSB0aGUgc3QBMAEBAQE- X-Mailer: YahooMailWebService/0.8.142.542 References: <1368457293547-5755256.post@n5.nabble.com> <51916C59.6010700@catalyst.net.nz> <1368891351220-5756093.post@n5.nabble.com> Message-ID: <1369059140.15629.YahooMailNeo@web162906.mail.bf1.yahoo.com> Date: Mon, 20 May 2013 07:12:20 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: statistics target for columns in unique constraint? To: ach , "pgsql-performance@postgresql.org" In-Reply-To: <1368891351220-5756093.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: 0.7 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org ach wrote: > One quick follow up since I'm expecting y'all might know:=A0 Do the > statistics targets actually speed performance on an index search > itself; the actual lookup?=A0 Or are the JUST to inform the planner > towards the best pathway decision? Since the statistics are just a random sampling and generally not completely up-to-date, they really can't be used for anything other than *estimating* relative costs in order to try to pick the best plan.=A0 Once a plan is chosen, its execution time is not influenced by the statistics.=A0 A higher statistics target can increase planning time.=A0 In a complex query with many joins and many indexes on the referenced tables, the increase in planning time can be significant.=A0 I have seen cases where blindly increasing the default statistics target resulted in planning time which was longer than run time -- without any increase in plan quality. Generally when something is configurable, it's because there can be benefit to adjusting it.=A0 If there was a single setting which could not be materially improved upon for some cases, we wouldn't expose a configuration option.=A0 This is something which is not only globally adjustable, you can override the setting for individual columns -- again, we don't go to the trouble of supporting that without a good reason. --=20 Kevin Grittner EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance