Adding 'Indexes' sub section.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 1m25s

This commit is contained in:
Maxime Delporte
2025-11-13 18:57:24 +01:00
parent 0d1062d995
commit a17a49e814

View File

@@ -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. 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 ## Additional Information
### How different Go Types are encoded ### How different Go Types are encoded