From a17a49e8144e7daf8e3f7698bd8cf3ff5f6ea61e Mon Sep 17 00:00:00 2001 From: Maxime Delporte Date: Thu, 13 Nov 2025 18:57:24 +0100 Subject: [PATCH] Adding 'Indexes' sub section. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 32cd03e..8f7a890 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,12 @@ sql: converting argument $1 type: uint64 values with high bit set are not suppor By sticking with an int64 in our Go code, we eliminate the risk of ever encountering this error. +### Indexes + +If you are not familiar with the concept of indexes in SQL databases, the official PostgreSQL documentation provides a [good introduction](https://www.postgresql.org/docs/current/indexes-intro.html) and a summary of different [index types](https://www.postgresql.org/docs/current/indexes-types.html). I recommend reading these quickly to give you an overview before continuing. + +In our case, it makes sense to create [GIN indexes](https://www.postgresql.org/docs/current/textsearch-indexes.html) on both the **genres** field and the lexemes generated by **to_tsvector()**, both which are used in the **WHERE** clause of our SQL query. + ## Additional Information ### How different Go Types are encoded