Re: pg_restore takes more time on creation of rules

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: pg_restore takes more time on creation of rules
Date: 2019-05-22 17:00:51
Message-ID: 20190522170051.nqsjbl26qsdct66j@development
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-performance

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Lev Kokotov 2019-05-22 23:36:49 Meaning of srsubstate values in pg_subscription_rel
Previous Message Mariel Cherkassky 2019-05-22 16:44:13 Re: pg_restore takes more time on creation of rules

Browse pgsql-performance by date

  From Date Subject
Next Message Jeremy Altavilla 2019-05-22 22:21:38 Re: Analyze results in more expensive query plan
Previous Message Mariel Cherkassky 2019-05-22 16:44:13 Re: pg_restore takes more time on creation of rules