From: | Rob Sargent <robjsargent(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Surprised by index choice for count(*) |
Date: | 2018-05-01 16:13:20 |
Message-ID: | 59632FB7-2378-4A77-8B37-BCF5A438411F@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you both. Simple, as expected. And I’m easily surprised.
Version 10 (perhaps obviously) for those scoring at home.
> On May 1, 2018, at 10:11 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Rob Sargent <robjsargent(at)gmail(dot)com> writes:
>> Should I be? I would have thought the pk would have been chosen v.
>> function index?
>
> If I'm reading this correctly, the PK index contains uuids while
> the fpv index contains float4s, meaning the latter is probably half
> the size. So scanning it is a lot cheaper, at least according to
> the planner's cost model.
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Eric Hanson | 2018-05-01 17:34:41 | extension dependencies with 'requires' |
Previous Message | Tom Lane | 2018-05-01 16:11:12 | Re: Surprised by index choice for count(*) |