From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
Cc: | Cory Tucker <cory(dot)tucker(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Bad Query Plans on 10.3 vs 9.6 |
Date: | 2018-03-29 13:47:01 |
Message-ID: | 13699.1522331221@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> writes:
> On 29 March 2018 at 18:26, Cory Tucker <cory(dot)tucker(at)gmail(dot)com> wrote:
>> The plan on 9.6 v 10.3 are effectively identical except in 9.6 the planner
>> decides to use an index only scan on the primary key and in 10.3 it does a
>> sequential scan. The problem is the sequential scan is for a table of 75M
>> rows and 25 columns so its quiet a lot of pages it has to traverse.
> How certain are you that all the indexes match on each instance?
Another possibility is that 10.3 sees the index-only scan as too expensive
because it thinks most of the table isn't all-visible. Comparing
pg_class.relallvisible values might be informative.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Cory Tucker | 2018-03-29 14:21:06 | Re: Bad Query Plans on 10.3 vs 9.6 |
Previous Message | Alvar C.H. Freude | 2018-03-29 10:50:25 | Re: Question about buffers_alloc in pg_stat_bgwriter view for monitoring |