If I have a table where 99% of rows with column x has a default value and want to search for a specific value in that column, will creating a partial index on x provide any improvements?
For example,
CREATE INDEX non_empty_name ON stores (foo) WHERE foo != '';
Would the following query actually trigger an index-only scan?
SELECT id FROM stores WHERE foo = 'Hello';
OR
SELECT id FROM stores WHERE foo LIKE '%ello';