Re: Highly Variable Planning Times

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Michael Malis <michaelmalis2(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Highly Variable Planning Times
Date: 2017-04-19 21:58:16
Message-ID: CAMkU=1zLjM8LhQtfha36U6dNKCzy3QECh7f6aAJSv=xRCMy8gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 19, 2017 at 2:39 PM, Michael Malis <michaelmalis2(at)gmail(dot)com>
wrote:

> > TBH, I see no convincing explanation in that article of why 1300 partial
> > indexes are a good idea.
>
> I don't like it much either. I've been trying to eliminate most of the
> need for the partial indexes, but this is the current state of things.
>
> > *At best*, you're doing substantial work in the
> > planner to avoid the first tree descent step or two in a single
> > non-partial index.
>
> While the specific example I gave in the post could be replaced with a
> non-partial index, most of the partial indexes contain predicates that
> are not straightforward to index with non-partial indexes. About 85%
> of the partial indexes contain a regular expression in them for CSS
> selector matching. I've tried using a trigram GIN index, but it wound
> up not working too well due to the data being highly redundant (almost
> every CSS hierarchy contains 'div' in it).

pg_trgm 1.2 or higher has code to help with very common trigrams. But to
try it, you would need to upgrade PostgreSQL to 9.6.

Cheers,

Jeff

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-04-19 22:04:07 Unportable implementation of background worker start
Previous Message Michael Malis 2017-04-19 21:39:15 Re: Highly Variable Planning Times