From: | <Masahiro(dot)Ikeda(at)nttdata(dot)com> |
---|---|
To: | <pg(at)bowt(dot)ie> |
Cc: | <postgres(at)jeltef(dot)nl>, <pgsql-hackers(at)lists(dot)postgresql(dot)org>, <Masao(dot)Fujii(at)nttdata(dot)com> |
Subject: | RE: Improve EXPLAIN output for multicolumn B-Tree Index |
Date: | 2024-07-01 02:55:54 |
Message-ID: | TYWPR01MB109824F5B21446DCD0610F296B1D32@TYWPR01MB10982.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2024-06-29 03:27, Peter Geoghegan wrote:
> On Thu, Jun 27, 2024 at 11:06 PM <Masahiro(dot)Ikeda(at)nttdata(dot)com> wrote:
>> Although I haven't looked on your patch yet, if it's difficult to know
>> how it can optimize during the planning phase, it's enough for me to just
>> show "Skip Scan Cond (or Non-Key Filter)". This is because users can
>> understand that inefficient index scans *may* occur.
>
> That makes sense.
>
> The goal of your patch is to highlight when an index scan is using an
> index that is suboptimal for a particular query (a query that the user
> runs through EXPLAIN or EXPLAIN ANALYZE). The underlying rules that
> determine "access predicate vs. filter predicate" are not very
> complicated -- they're intuitive, even. But even an expert can easily
> make a mistake on a bad day.
>
> It seems to me that all your patch really needs to do is to give the
> user a friendly nudge in that direction, when it makes sense to. You
> want to subtly suggest to the user "hey, are you sure that the index
> the plan uses is exactly what you expected?". Fortunately, even when
> skip scan works well that should still be a useful nudge. If we assume
> that the query that the user is looking at is much more important than
> other queries, then the user really shouldn't be using skip scan in
> the first place. Even a good skip scan is a little suspicious (it's
> okay if it "stands out" a bit).
Yes, you're right. I'd like users to take the chance easily.
--
Masahiro Ikeda
NTT DATA CORPORATION
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2024-07-01 03:08:33 | Re: Should we document how column DEFAULT expressions work? |
Previous Message | Masahiro.Ikeda | 2024-07-01 02:53:51 | RE: Improve EXPLAIN output for multicolumn B-Tree Index |