> >
> > create table test (test_col text);
> > create index test_index on test (test_col);
> > insert into test values ('abc.xyz');
> > insert into test values ('abcxyz');
> > insert into test values ('abc/xyz');
> >
First of all when you create an index u must specify what kind of ops will use that index, in this case create index test_index on test (test_col , text_ops)
Second, a index only will be used if there is an advantage on using it, in this case, u have 3 unique values, unless random-page cost is lower than 3, planner would not use it.
Third of all, if u want to learn how to use indexes, try numeric values first, because indexing texts is a bit more difficult.