From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Ravi Tammineni <rtammineni(at)partner(dot)aligntech(dot)com>, Chris Mair <chris(at)1006(dot)org> |
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-17 22:21:15 |
Message-ID: | 70190c66-cf64-4741-1cd7-a6cf08f4101f@2ndquadrant.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support pgsql-admin pgsql-general |
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.
regards
Tomas
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Mair | 2017-01-18 00:22:29 | Re: Queries are taking way longer in 9.6 than 9.5 |
Previous Message | Ravi Tammineni | 2017-01-17 20:49:53 | Re: Queries are taking way longer in 9.6 than 9.5 |
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Mair | 2017-01-18 00:22:29 | Re: Queries are taking way longer in 9.6 than 9.5 |
Previous Message | Ravi Tammineni | 2017-01-17 20:49:53 | Re: Queries are taking way longer in 9.6 than 9.5 |
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Mair | 2017-01-18 00:22:29 | Re: Queries are taking way longer in 9.6 than 9.5 |
Previous Message | John R Pierce | 2017-01-17 21:28:40 | Re: Fwd: [webmaster] Update query issue |