Saturday, October 28, 2017

Drinking Games with PostgreSQL: GIN and RUM


Fulltext support is a very important feature of most modern relational databases. For one, they enable fast information retrieval and for another, they simply allow application designers and operators to remain inside the known relational world. No need for a second database-like system, no need for additional maintenance, no need for yet another library, no need for a fundamentally different query language. You get the point.

Starting with version 8.3, PostgreSQL supports the tsvector and tsquery constructs and with it indexing support for the matching operator. This post will cover more of those indexing technology which we can utilize for accelerating regular expressions, LIKE-queries, fulltext and even JSON-related queries.