Re: Less-silly selectivity for JSONB matching operators

Alexey Bashtanov <bashtanov@imap.cc>

From: Alexey Bashtanov <bashtanov@imap.cc>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2020-03-31T15:55:13Z
Lists: pgsql-hackers
Hi Tom,

The patches look entirely reasonable to me.
The second one needs to be rebased.

I like the idea of stubbing matchjoinsel for now,
as well as being careful with operators that may correlate with sort 
orderings.

The only little thing I can think of is hardcoding it as 2 * DEFAULT_EQ_SEL.
While I don't have any arguments against the value itself I think it 
should be configurable independently.
Sadly DEFAULT_MATCH_SEL name is already taken for text patterns.
Not sure if it's a reason to rename all the stuff.

Best, Alex



Commits

  1. Improve selectivity estimation for assorted match-style operators.

  2. Implement operator class parameters