# O(n2) Complexity of GIN Search

> When GIN indexes are used to search with very long keyword lists, performance degrades significantly. This article explains why GIN index keyword search has O(n^2) time complexity.

---

LLMS index: [llms.txt](/llms.txt)

---

[![featured](/img/hero/pg/gin.jpg)](https://vonng.com/en/pg/gin/)

When GIN indexes are used to search with very long keyword lists, performance degrades significantly. This article explains why GIN index keyword search has O(n^2) time complexity. [**Read more**](https://vonng.com/en/pg/gin/)
