pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Mariel Cherkassky <mariel.cherkassky@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: pg_restore takes more time on creation of rules
Date: Wed, 22 May 2019 19:00:51 +0200
Message-ID: <20190522170051.nqsjbl26qsdct66j@development> (raw)
In-Reply-To: <CA+t6e1kUNo7V=LtBp0bvFZDFkB-sXxW+SNFNmR6+YQU8N+Bgow@mail.gmail.com>
References: <CA+t6e1=OWhBrXhyzQdTTdsobo9x82DaGH6J+euuGSAvLERYzcg@mail.gmail.com>
	<20190522154102.zpvieebklnvis5u3@development>
	<CA+t6e1kUNo7V=LtBp0bvFZDFkB-sXxW+SNFNmR6+YQU8N+Bgow@mail.gmail.com>

On Wed, May 22, 2019 at 06:44:29PM +0300, Mariel Cherkassky wrote:
>By rules I mean DB rules (simillar to triggers but different)
>

I very much doubt such high number of rules was expected during the
design (especially if it's on a single table), so perhaps there's an
O(N^2) piece of code somewhere. I suggest you do a bit of profiling, for
example using perf [1], which would show where the time is spent.

[1] https://wiki.postgresql.org/wiki/Profiling_with_perf

And please stop top-posting, it makes it much harder to follow the
discussion.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services






view thread (8+ messages)

Message-ID: <20190522170051.nqsjbl26qsdct66j@development>
Permalink:  ../20190522170051.nqsjbl26qsdct66j@development/
Also on:    postgresql.org/message-id/20190522170051.nqsjbl26qsdct66j@development

 · 

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: tomas.vondra@2ndquadrant.com, mariel.cherkassky@gmail.com, pgsql-performance@lists.postgresql.org, pgsql-admin@lists.postgresql.org
  Subject: Re: pg_restore takes more time on creation of rules
  In-Reply-To: <20190522170051.nqsjbl26qsdct66j@development>

* 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