From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Thomas Güttler <guettliml(at)thomas-guettler(dot)de> |
Cc: | pgsql-performance(at)lists(dot)postgresql(dot)org |
Subject: | Re: Detect missing combined indexes (automatically) |
Date: | 2019-01-15 10:25:06 |
Message-ID: | CAOBaU_Zh=ACPm9EnvVSrk0daD21yi4+y_urfqgxAnCBACXFBUw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hi,
On Tue, Jan 15, 2019 at 10:22 AM Thomas Güttler
<guettliml(at)thomas-guettler(dot)de> wrote:
>
> Hi Julien Rouhaud,
>
> powa can handle multi-column indexes now? Great news. This must be a new
> feature. I checked this roughly one year ago and it was not possible at this time.
> Thank you very much powa!
Oh, that's unexpected. The first version of the "wizard" (the
"optimize this database" button on the database page) we published was
supposed to handle multi-column indexes. We had few naive tests for
that, so at least some cases were working. What it's doing is
gathering all the quals that have been sampled by pg_qualstats in the
given interval on the given database, and then try to combine them
(possibly merging a single column qual into a multi-column qual),
order them by number of distinct queryid so it can come up with a
quite good set of indexes. So if there are queries with multiple
AND-ed quals on the same table in your workload, it should be able to
suggest a multi-column index. If it doesn't, you should definitely
open a bug on the powa-web repo :)
What it won't do is to suggest to replace a single column index with a
multi-column one, or create a multi-column index if one of the column
is already indexes since only one of the column will be seen as
needing optimization.
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2019-01-16 05:41:47 | Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0 |
Previous Message | Thomas Güttler | 2019-01-15 09:23:12 | Re: Detect missing combined indexes (automatically) |