Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UbuFv-0008H8-EW for pgsql-performance@arkaria.postgresql.org; Mon, 13 May 2013 15:01:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UbuFu-0000A0-PI for pgsql-performance@arkaria.postgresql.org; Mon, 13 May 2013 15:01:38 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UbuFt-00008p-1f for pgsql-performance@postgresql.org; Mon, 13 May 2013 15:01:37 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UbuFq-0000xQ-Bw for pgsql-performance@postgresql.org; Mon, 13 May 2013 15:01:36 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1UbuFp-0005SG-IR for pgsql-performance@postgresql.org; Mon, 13 May 2013 08:01:33 -0700 Date: Mon, 13 May 2013 08:01:33 -0700 (PDT) From: ach To: pgsql-performance@postgresql.org Message-ID: <1368457293547-5755256.post@n5.nabble.com> Subject: statistics target for columns in unique constraint? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 3.2 (+++) 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 I have a unique constraint on two columns of a supermassive table (est. 1.7 bn rows) that are the only way the table's ever queried - and it's blindingly fast: 51ms to retrieve any single row even non-partitioned. Anyway: Right now statistics on the two unique constrained columns are set to 200 each (database-wide default is 100), and what I'm wondering is, since the unique constraint already covers the whole table and all rows in entirety, is it really necessary for statistics to be set that high on those? Or does that only serve to slow down inserts to that table? -- View this message in context: http://postgresql.1045698.n5.nabble.com/statistics-target-for-columns-in-unique-constraint-tp5755256.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance