I have a large postgresql table (T) that has a small varchar(50) column (C), and there's a btree index on C
neither of the following use the index, and both take a considerate amount of time:
select * from T where C like 'myprefix%'
select * from T where C ~ '^myprefix'
how can I make such queries faster? Am I doing anything wrong? Is there some other kind of extension/index that will help? My pattern are always the prefix (anchored to the left)