1

Topic: The filter on an index

There is an indexed field varchar (150)

select * from the table where a field = ' a line'

index scan, 0 lines

select *, a field =' ' from the table where a field || "= ' a line'

Seq scan, 5 lines, at all (a field =' ') = true
How such can be?
PostgreSQL 9.5.0, compiled by A Visual C ++ build 1800, 64-bit
PS reindex did not help.

2

Re: The filter on an index

[quote = _ avz] there is an indexed field varchar (150)

select * from the table where a field = ' a line'

index scan, 0 lines

select *, a field =' ' from the table where a field || "= ' a line'

Seq scan, 5 lines, at all (a field =' ') = true
How such can be?
PostgreSQL 9.5.0, compiled by A Visual C ++ build 1800, 64-bit
PS reindex did not help.

To begin with at you 9.5.0 thus that current 9.5.13 (i.e. you passed 13 bug-fix releases for last 4 year).
Besides while ideas are not present.
For what that of specific value of a line works it or for any?
I still would advise to deliver https://github.com/petergeoghegan/amcheck and to check up an index with its help.
--
Maxim Boguk
the best support PostgreSQL: dataegret.ru