On Wed, Dec 25, 2019 at 8:25 AM Alexander Korotkov <
a.korot...@postgrespro.ru> wrote:

> Patch requires further polishing including comments, minor refactoring
> etc.  I'm going to continue work on this.
>

I also run the same performance comparison as Nikita [1] on my laptop.
The results are shown below.  PostgreSQL was built with -O2 and
asserts enabled.

                                       | Query time, ms |
            WHERE condition            | master | patch |
---------------------------------------+--------+-------+
 a @> '{}'                             |    117 |   116 |
 a @> '{}' and b @> '{}'               |    150 |   146 |
 a @> '{}' and b @> '{}' and c @> '{}' |    168 |   167 |
 a @> '{}' and a @@ '1'                |    126 |   0.6 |
 a @> '{}' and a @@ '-1'               |    128 |   3.2 |
 a @@ '!-1' and a @@ '1'               |    127 |   0.7 |
 a @@ '!1' and a @@ '-1'               |    122 |   4.4 |

Performance effect looks similar to patch #4 by Nikita.  I've tried to
add patch #4 to comparison, but I've catch assertion failure.

TRAP: FailedAssertion("key->includeNonMatching", File: "ginget.c", Line:
1340)

I'm going to continue polishing my version of patch.

Links
1.
https://www.postgresql.org/message-id/f2889144-db1d-e3b2-db97-cfc8794cda43%40postgrespro.ru

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Reply via email to