Skip to content

Add trigram index on snippet content

What does this MR do?

Adds a trigram index on snippets.content.

As an example, one of the count query times are:

Before
Cost: 154933.06

Time: 53.909 s
  - planning: 39.449 ms
  - execution: 53.870 s
    - I/O read: 3.192 s

Shared buffers:
  - hits: 473896 (~3.60 GiB) from the buffer pool
  - reads: 130084 (~1016.30 MiB) from the OS file cache, including disk I/O
  - dirtied: 2252 (~17.60 MiB)
  - writes: 0
After
Cost: 4333.77

Time: 11.718 s
  - planning: 42.159 ms
  - execution: 11.676 s
    - I/O read: 347.184 ms

Shared buffers:
  - hits: 98099 (~766.40 MiB) from the buffer pool
  - reads: 470 (~3.70 MiB) from the OS file cache, including disk I/O
  - dirtied: 0
  - writes: 0

The resulting index size in production is around 280MB

Does this MR meet the acceptance criteria?

Conformity

Closes #32885 (closed)

Merge request reports