Re: [PERFORM] How does max_parallel_workers_per_gather change load averages?

2017-10-03 Thread David Rowley
On 4 October 2017 at 08:48, Ben Nachtrieb wrote: > I have 2 cores and my max_parallel_workers_per_gather = 2 and > max_worker_processes = 8, but my load averages are between 8 and 5 with > scheduled at 1/189 to 5/195. Are these so high because I increased >

Re: [PERFORM] select with max functions

2017-10-03 Thread Mark Kirkwood
On 03/10/17 04:29, Tom Lane wrote: Mariel Cherkassky writes: explain analyze SELECT Ma.User_Id, COUNT(*) COUNT FROM Manuim Ma WHERE Ma.Bb_Open_Date = (SELECT

[PERFORM] How does max_parallel_workers_per_gather change load averages?

2017-10-03 Thread Ben Nachtrieb
Hello, This is my first question on this list. How does max_parallel_workers_per_gather change Linux server load averages? I have 2 cores and my max_parallel_workers_per_gather = 2 and max_worker_processes = 8, but my load averages are between 8 and 5 with scheduled at 1/189 to 5/195. Are

Re: [PERFORM] Stored Procedure Performance

2017-10-03 Thread Pavel Stehule
2017-10-03 17:17 GMT+02:00 Adam Brusselback : > There is also the option of pg_stat_statements: https:// > www.postgresql.org/docs/current/static/pgstatstatements.html and > auto_explain: https://www.postgresql.org/docs/current/ > static/auto-explain.html > > These

Re: [PERFORM] Stored Procedure Performance

2017-10-03 Thread Adam Brusselback
There is also the option of pg_stat_statements: https://www.postgresql.org/docs/current/static/pgstatstatements.html and auto_explain: https://www.postgresql.org/docs/current/static/auto-explain.html These should help you identify what is slowing things down. There is no reason I could think of

Re: [PERFORM] Stored Procedure Performance

2017-10-03 Thread Laurenz Albe
Purav Chovatia wrote: > I come from Oracle world and we are porting all our applications to > postgresql. > > The application calls 2 stored procs,  > - first one does a few selects and then an insert > - second one does an update > > The main table on which the insert and the update happens is

[PERFORM] Stored Procedure Performance

2017-10-03 Thread Purav Chovatia
Hello, I come from Oracle world and we are porting all our applications to postgresql. The application calls 2 stored procs, - first one does a few selects and then an insert - second one does an update The main table on which the insert and the update happens is truncated before every