Re: Queries are taking way longer in 9.6 than 9.5

From: Chris Mair <chris(at)1006(dot)org>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Ravi Tammineni <rtammineni(at)partner(dot)aligntech(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Queries are taking way longer in 9.6 than 9.5
Date: 2017-01-18 00:22:29
Message-ID: dfa066c765ed68b8564a30322467e6dc@smtp.hushmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-admin pgsql-general

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
> -> Nested Loop (cost=0.17..67.44 rows=192 width=4)
> -> Index Scan using unq_user_name on tblcnaccounts ...
> Index Cond: ((user_name)::text = 'dddddd'::text)
> -> Index Only Scan using idx_tblcndoctorpatientmap ...
> Index Cond: (master_user_id = a.master_user_id)
>
> while the 9.6 plan does not include anything like that, i.e. there's only a single aggregate at the top level, without any group keys. Also, the SQL query you've provided does not include any GROUP BY clause, so I claim that those plans are from two different queries.

There's also a user_name = 'dddddd' that has become a user_name = 'rdoyleda' ...

Ravi, could you please send the current query you're testing and the explain analyze of that query on 9.5 and 9.6?

Bye,
Chris.

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2017-01-18 09:36:42 Re: Function not displaying PARALLEL SAFE on SQL tab
Previous Message Tomas Vondra 2017-01-17 22:21:15 Re: Queries are taking way longer in 9.6 than 9.5

Browse pgsql-admin by date

  From Date Subject
Next Message Neslisah Demirci 2017-01-18 04:54:49 postgresql : could not serialize access due to read/write dependencies among transactions
Previous Message Tomas Vondra 2017-01-17 22:21:15 Re: Queries are taking way longer in 9.6 than 9.5

Browse pgsql-general by date

  From Date Subject
Next Message Neslisah Demirci 2017-01-18 04:54:49 postgresql : could not serialize access due to read/write dependencies among transactions
Previous Message Tomas Vondra 2017-01-17 22:21:15 Re: Queries are taking way longer in 9.6 than 9.5