I have a table in PostgreSQL 9.2 that has a text column. Let\'s call this text_col. The values in this column are fairly unique (may contain 5-6 du
A partial index is only used if the WHERE conditions match. Thus an index with WHERE text_col IS NOT NULL can only be used if you use the same condition in your SELECT. Collation mismatch could also cause harm.
Try the following:
CREATE INDEX foo ON table (text_col)ANALYZE table