From: Chris Mair <chris@1006.org>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Ravi Tammineni <rtammineni@partner.aligntech.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Queries are taking way longer in 9.6 than 9.5
Date: Wed, 18 Jan 2017 01:22:29 +0100
Message-ID: <dfa066c765ed68b8564a30322467e6dc@smtp.hushmail.com> (raw)
In-Reply-To: <70190c66-cf64-4741-1cd7-a6cf08f4101f@2ndquadrant.com>
References: <MWHPR02MB2655591A4E27B425FABD5E93807C0@MWHPR02MB2655.namprd02.prod.outlook.com>
<a0680eb9d03df0f54690eb2a7351744e@smtp.hushmail.com>
<MWHPR02MB265508B2200BD5A17DDE5DA3807C0@MWHPR02MB2655.namprd02.prod.outlook.com>
<70190c66-cf64-4741-1cd7-a6cf08f4101f@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: chris@1006.org, tomas.vondra@2ndquadrant.com, rtammineni@partner.aligntech.com, pgsql-general@postgresql.org
Subject: Re: Queries are taking way longer in 9.6 than 9.5
In-Reply-To: <dfa066c765ed68b8564a30322467e6dc@smtp.hushmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox