Description
We see customer queries of the form
WHERE x LIKE '%abc%'
Currently. such a query cannot effectively use an index on x. With a SUFFIXES() function that generates an array of all the suffixes of a string, the following index and query can be used.
CREATE INDEX idx ON b( DISTINCT ARRAY s FOR s IN SUFFIXES END );
WHERE ANY s IN SUFFIXES SATISFIES s LIKE 'abc%' END;