title: Indexing array of strings column type in PostgreSQL
body: <p>Is it possible to create an index on a column with type of <strong>text array</strong>. Tried using <strong>GIN</strong> indexes, but queries do not seem to be using those indexes.</p>
  <pre><code>-- Example:
  CREATE TABLE users (
     name VARCHAR(100),
     groups TEXT[],
  );
  
  -- Query: 
  SELECT name FROM users WHERE ANY(groups) = 'Engineering';
  </code></pre>
  <p>Also what is the best way to perform <code>GROUP BY</code> on <code>groups</code> column efficiently so that it can give <code>groups</code> and count.</p>