Re: Analyze results in more expensive query plan

2019-05-22 Thread Jeremy Altavilla
Thanks for the help. In our prod environment, we shouldn't be planning unnecessarily. Our app uses the extended query protocol (prepare/bind/exec) to call pg/plsql stored procedures. I left out a lot of context and background in my question, because I hoped it simplified things. I might have left

Re: Use Postgres as a column store by creating one table per column

2019-05-22 Thread George Neuner
On Tue, 21 May 2019 21:28:07 -0700, Lev Kokotov wrote: >Is it efficient to use Postgres as a column store by creating one table per >column? > >I would query it with something like `[...] UNION SELECT value AS >FROM WHERE value = UNION [...]` to build a row. I think you mean JOIN. You'd

Re: pg_restore takes more time on creation of rules

2019-05-22 Thread Tomas Vondra
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 somewhe

Re: pg_restore takes more time on creation of rules

2019-05-22 Thread Mariel Cherkassky
By rules I mean DB rules (simillar to triggers but different) ‫בתאריך יום ד׳, 22 במאי 2019 ב-18:41 מאת ‪Tomas Vondra‬‏ <‪ tomas.von...@2ndquadrant.com‬‏>:‬ > On Wed, May 22, 2019 at 06:26:49PM +0300, Mariel Cherkassky wrote: > >Hey, > >I'm trying to restore a cluster (9.2) from 3 binary dumps (pg

Re: pg_restore takes more time on creation of rules

2019-05-22 Thread Tomas Vondra
On Wed, May 22, 2019 at 06:26:49PM +0300, Mariel Cherkassky wrote: Hey, I'm trying to restore a cluster (9.2) from 3 binary dumps (pg_dump -Fc). Each dump contains only one database. The sizes : A-10GB B-20GB C-5GB. For unclear reason the restore of the third database is taking alot of time. It

pg_restore takes more time on creation of rules

2019-05-22 Thread Mariel Cherkassky
Hey, I'm trying to restore a cluster (9.2) from 3 binary dumps (pg_dump -Fc). Each dump contains only one database. The sizes : A-10GB B-20GB C-5GB. For unclear reason the restore of the third database is taking alot of time. It isnt stuck but it continues creating db rules. This database has more

Re: Log size in bytes of query result

2019-05-22 Thread Dmitry Dolgov
> On Wed, May 22, 2019 at 2:51 PM Franklin Haut wrote: > > By my analysis, I see that the most efficient way to perform this control > would be in the existing medium in postgresql that is the log file (pg_log) > adding a few more variables for each query executed. > On Fri, May 10, 2019 at 6:42

Re: Log size in bytes of query result

2019-05-22 Thread Franklin Haut
@Sergei and @Laurenz Thank you for reply. I think it is important to have other resource indicators consumed by the query besides the execution time as the amount of Bytes sent / received by each query, how many blocks / bytes were read / written from the cache or had to be loaded from the disk o