Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-19 Thread Merlin Moncure
On Thu, Jan 19, 2017 at 1:28 AM, Tomas Vondra wrote: > On 01/19/2017 06:21 AM, Merlin Moncure wrote: >> > ... >> >> >> yes. Either way, I would like to very much understand how server is >> preferring 3m cost plan to 2.6k cost plan or is otherwise unable to >> access the cheap plan. >> > > Perhap

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-18 Thread Tomas Vondra
On 01/19/2017 06:21 AM, Merlin Moncure wrote: > ... yes. Either way, I would like to very much understand how server is preferring 3m cost plan to 2.6k cost plan or is otherwise unable to access the cheap plan. Perhaps it doesn't even see the 2.6k cost - it may not generate the plan for som

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-18 Thread Merlin Moncure
On Wed, Jan 18, 2017 at 11:10 PM, Adrian Klaver wrote: > On 01/18/2017 08:58 PM, Merlin Moncure wrote: >> >> On Wed, Jan 18, 2017 at 2:12 PM, Melvin Davidson > > wrote: >> >> >> >> On Wed, Jan 18, 2017 at 3:06 PM, Merlin Moncure > > w

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-18 Thread Adrian Klaver
On 01/18/2017 08:58 PM, Merlin Moncure wrote: On Wed, Jan 18, 2017 at 2:12 PM, Melvin Davidson mailto:melvin6...@gmail.com>> wrote: On Wed, Jan 18, 2017 at 3:06 PM, Merlin Moncure mailto:mmonc...@gmail.com>> wrote: On Wed, Jan 18, 2017 at 1:04 PM, Ravi Tammineni mailto:rta

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-18 Thread Merlin Moncure
On Wed, Jan 18, 2017 at 2:12 PM, Melvin Davidson wrote: > > > On Wed, Jan 18, 2017 at 3:06 PM, Merlin Moncure > wrote: > >> On Wed, Jan 18, 2017 at 1:04 PM, Ravi Tammineni >> wrote: >> > Hi Chris, >> > >> > Here is the query and execution plan in 9.5 and 9.6. >> >> Can you verify tblpuorderstat

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-18 Thread Melvin Davidson
On Wed, Jan 18, 2017 at 3:06 PM, Merlin Moncure wrote: > On Wed, Jan 18, 2017 at 1:04 PM, Ravi Tammineni > wrote: > > Hi Chris, > > > > Here is the query and execution plan in 9.5 and 9.6. > > Can you verify tblpuorderstatus and tblpuorderstatushistory have all > indexes accounted for on both se

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-18 Thread Merlin Moncure
On Wed, Jan 18, 2017 at 1:04 PM, Ravi Tammineni wrote: > Hi Chris, > > Here is the query and execution plan in 9.5 and 9.6. Can you verify tblpuorderstatus and tblpuorderstatushistory have all indexes accounted for on both servers? It seems incredible server would prefer wading through 11M recor

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-18 Thread Ravi Tammineni
hanks ravi -Original Message- From: Chris Mair [mailto:ch...@1006.org] Sent: Tuesday, January 17, 2017 4:22 PM To: Tomas Vondra ; Ravi Tammineni Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5 On 17/01/17 23:21, Tomas Vondra wrote: &

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Chris Mair
On 17/01/17 23:21, Tomas Vondra wrote: Hi, after looking at the explain plans again, I very much doubt those come from the same query. The reason is the 9.5 plan contains this part: -> HashAggregate (cost=67.54..68.12 rows=192 width=4) Group Key: d.vip_patient_id ->

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Tomas Vondra
Hi, after looking at the explain plans again, I very much doubt those come from the same query. The reason is the 9.5 plan contains this part: -> HashAggregate (cost=67.54..68.12 rows=192 width=4) Group Key: d.vip_patient_id -> Nested Loop (cost=0.17..67.44 rows=192

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Ravi Tammineni
...@1006.org] Sent: Tuesday, January 17, 2017 12:39 PM To: Ravi Tammineni Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5 Hi. > explain analyze > > SELECT count(*) > > [...] >

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Tomas Vondra
On 01/17/2017 08:31 PM, Ravi Tammineni wrote: Hi, We have recently upgraded to 9.6 and few queries are performing very poorly. Query execution time has increased more 4 or 5 times in 9.6. Qeruy execution plan is also completely changed. I am not sure whether its because of Parallel feature or an

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Chris Mair
Hi. explain analyze SELECT count(*) [...] QUERY PLAN - Aggregate (cost=

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Melvin Davidson
> ravi > > > > -Original Message- > From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] > Sent: Tuesday, January 17, 2017 11:42 AM > To: Ravi Tammineni ; > pgsql-ad...@postgresql.org; pgsql-general@postgresql.org; > pgadmin-supp...@postgresql.org > Subject: Re: [

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Ravi Tammineni
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Tuesday, January 17, 2017 11:42 AM To: Ravi Tammineni ; pgsql-ad...@postgresql.org; pgsql-general@postgresql.org; pgadmin-supp...@postgresql.org Subject: Re: [GENERAL] Queries are taking way longer in 9.

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Ravi Tammineni
From: Melvin Davidson [mailto:melvin6...@gmail.com] Sent: Tuesday, January 17, 2017 11:36 AM To: Ravi Tammineni Cc: pgsql-ad...@postgresql.org; pgsql-general@postgresql.org; pgadmin-supp...@postgresql.org Subject: Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5 On Tue, Jan 17, 2017 at

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Adrian Klaver
On 01/17/2017 11:31 AM, Ravi Tammineni wrote: Hi, We have recently upgraded to 9.6 and few queries are performing very poorly. Query execution time has increased more 4 or 5 times in 9.6. Qeruy execution plan is also completely changed. I am not sure whether its because of Parallel feature or

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Melvin Davidson
On Tue, Jan 17, 2017 at 2:31 PM, Ravi Tammineni < rtammin...@partner.aligntech.com> wrote: > Hi, > > > > We have recently upgraded to 9.6 and few queries are performing very > poorly. Query execution time has increased more 4 or 5 times in 9.6. Qeruy > execution plan is also completely changed. I