Re: Strange nested loop for an INSERT

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: phb07 <phb07(at)apra(dot)asso(dot)fr>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Strange nested loop for an INSERT
Date: 2016-09-21 21:42:04
Message-ID: 06b366f8-7e3d-ec7d-d146-1984818d3bcc@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jim Nasby 2016-09-21 21:48:41 Re: Problem with performance using query with unnest after migrating from V9.1 to V9.2 and higher
Previous Message Mike Broers 2016-09-21 21:00:31 Re: query against single partition uses index, against master table does seq scan