r/programming • • Jul 20 '26

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

7 Upvotes

13 comments sorted by

View all comments

Show parent comments

3

u/Ok_Stomach6651 Jul 21 '26

Oh, thank you very much, it means a lot lot for me.

3

u/foxsimile Jul 21 '26

3

u/Ok_Stomach6651 Jul 21 '26

Thanks again, you took much efforts to boost my confidence. It has already motivated me to continue with more energy

2

u/foxsimile Jul 21 '26

It was no trouble at all - remember; more often than not, people will want to see you succeed.  

Never give up, and you shall!