Jake Magner <jakemagner90@xxxxxxxxx> writes: > I tried without doing an INSERT at all, just running the SELECT queries and > the result is the same. Nested loop is chosen but is much slower. FWIW, I just noticed that the comparisons you're using are plain equality of the arrays. While a GIN array index supports that, it's not exactly its strong suit: the sort of questions that index type supports well are more like "which arrays contain value X?". I wonder if it'd be worth creating btree indexes on the array column. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance