A B-tree is PostgreSQL’s default ordered index. It accelerates equality and ordering comparisons, but choosing it for arbitrary substring search is a common mistake. For JSONB titles, index the exact expression used by the query. section 4.4
Prefix matching works; containment does not
CREATE INDEX ON test.arxiv (lower(data->>'title') text_pattern_ops);\n\nThe matching prefix uses an Index Scan and finishes in 0.134 ms. Changing the predicate to LIKE '%modeling of hydrogen%' forces a Sequential Scan: 2,417,688 rows are filtered and execution takes 8,624 ms.



