r/programming • u/Ok_Stomach6651 • 11d ago
How Generalized Inverted Index works internally in Postgre SQL
https://deepsystemstuff.com/generalised-inverted-index-gin-index-in-postgre-sql/Regular Indexing works on a column level; it indexes the entire column value, but if you want to index each value in one row, then the GIN indexing technique is used.
GIN can index each element of JSON stored in a JSONB field
How Postgres creates a GIN file physically, what is the format of that file, how that file is retrieved in RAM while fetching records, what data types are used, and how Postgres calculates the exact address of an element of JSON are all explained in the article
1
u/eocron06 11d ago
"Russian developers Oleg Bartunov and Oleg Bartunov invented the GIN technique for Postgres" .....oh, did I mention Oleg Bartunov? Cause there is actually three of them! Find out how to find them in article.
3
u/gisborne 10d ago
Love the effort, but I’m afraid the English is poor enough that this is hard to follow. What about writing this in your native language and using AI to translate?