On 20 Oct 2016, at 23:37, Maxim Boguk wrote:
> ​Underscore in like pattern have a special meaning of "any symbol".
> From documentation on the
> https://www.postgresql.org/docs/9.4/static/functions-matching.html :
> "An underscore (_) in pattern stands for (matches) any single character;"
> This
On Fri, Oct 21, 2016 at 8:42 AM, Alexander Staubo
wrote:
> Indexing on a text column:
>
> create index index_documents_on_id_with_pattern_ops (id
> text_pattern_ops);
>
> This works fine:
>
> > explain select id from documents where id like 'dingbat%';
> Index Only Scan using index_do
Indexing on a text column:
create index index_documents_on_id_with_pattern_ops (id text_pattern_ops);
This works fine:
> explain select id from documents where id like 'dingbat%';
Index Only Scan using index_documents_on_id_with_pattern_ops on documents
(cost=0.56..8.58 rows=736 wi