Re: Problem (bug?) with like

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem (bug?) with like
Дата
Msg-id 13305.1007394045@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problem (bug?) with like  (bombadil@wanadoo.es)
Ответы Re: Problem (bug?) with like  (bombadil@wanadoo.es)
Список pgsql-general
bombadil@wanadoo.es writes:
>  Here are my queries:

You sure you didn't paste in the same result for #2 and #3?  They're
the same plan with the same rows estimates --- but I'd expect the rows
estimates, at least, to change given the more-selective LIKE pattern.

Also, how many rows are there really that match '%DA%' and '%DAVID%'?

I suspect the planner is being overoptimistic about the selectivity of
'%DAVID%', and is choosing a plan that doesn't work well when there are
lots of DAVIDs :-(

            regards, tom lane

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

Предыдущее
От: Fran Fabrizio
Дата:
Сообщение: Determining current database programmatically
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Determining current database programmatically