Re: Query returns no rows in pg_basebackup cluster

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query returns no rows in pg_basebackup cluster
Дата
Msg-id 19749.1590104161@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Query returns no rows in pg_basebackup cluster  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Query returns no rows in pg_basebackup cluster
Список pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, May 21, 2020 at 3:57 PM Adrian Klaver <adrian.klaver@aklaver.com>
> wrote:
>> Well what I was trying to figure out was:
>> "Windows server this query returns 0 rows.
>> In Windows server same query using like
>> select *  from firma1.desktop where baas like '_LOGIFAI'
>> returns properly 16 rows. "

> The LIKE query probably doesn't use an index and thus finds the relevant
> data via sequential scan and equality checks on each record.

Yeah, exactly.  An equality condition will use a btree index if
available.  LIKE, however, sees the "_" as a wildcard so it cannot
use an index and resorts to a seqscan --- which will work fine.
It's just index searches (and index-based sorts) that are broken.

Of course, if there isn't an index on the column in question
then this theory falls to the ground.

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Query returns no rows in pg_basebackup cluster
Следующее
От: Tim Cross
Дата:
Сообщение: Re: Should I use JSON?