pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: phb07 <phb07@apra.asso.fr>
To: pgsql-performance@postgresql.org
Subject: Re: Strange nested loop for an INSERT
Date: Wed, 21 Sep 2016 16:42:04 -0500
Message-ID: <06b366f8-7e3d-ec7d-d146-1984818d3bcc@BlueTreble.com> (raw)
In-Reply-To: <224290ce-84bb-935f-1743-3f036ae3d508@apra.asso.fr>
References: <CD1B112115AFCF46A0EB8CFD8EE88B461E2B19D2@FRCRPVV9EX4MSX.ww931.my-it-solutions.net>
	<1f22a3fa-dcc5-eeac-a708-7f10fada4674@apra.asso.fr>
	<25256.1473691295@sss.pgh.pa.us>
	<224290ce-84bb-935f-1743-3f036ae3d508@apra.asso.fr>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 9/12/16 1:05 PM, phb07 wrote:
> The drawback is the overhead of this added ANALYZE statement. With a
> heavy processing like in this test case, it is worth to be done. But for
> common cases, it's a little bit expensive.

You could always look at the number of rows affected by a command and 
make a decision on whether to ANALYZE based on that, possibly by looking 
at pg_stat_all_tables.n_mod_since_analyze.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (6+ messages)  latest in thread

Message-ID: <06b366f8-7e3d-ec7d-d146-1984818d3bcc@BlueTreble.com>
Permalink:  ../06b366f8-7e3d-ec7d-d146-1984818d3bcc@BlueTreble.com/
Also on:    postgresql.org/message-id/06b366f8-7e3d-ec7d-d146-1984818d3bcc@BlueTreble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, phb07@apra.asso.fr
  Subject: Re: Strange nested loop for an INSERT
  In-Reply-To: <06b366f8-7e3d-ec7d-d146-1984818d3bcc@BlueTreble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox