Re: Nested Loop "Killer" on 8.1

От: Tom Lane
Тема: Re: Nested Loop "Killer" on 8.1
Дата: ,
Msg-id: 5388.1245963930@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: Nested Loop "Killer" on 8.1  (Greg Stark)
Ответы: Re: Nested Loop "Killer" on 8.1  (Greg Stark)
Список: pgsql-performance

Скрыть дерево обсуждения

Nested Loop "Killer" on 8.1  ("Dave North", )
 Re: Nested Loop "Killer" on 8.1  (Josh Berkus, )
 Re: Nested Loop "Killer" on 8.1  (Greg Stark, )
  Re: Nested Loop "Killer" on 8.1  (Mark Mielke, )
  Re: Nested Loop "Killer" on 8.1  (Tom Lane, )
   Re: Nested Loop "Killer" on 8.1  (Greg Stark, )
    Re: Nested Loop "Killer" on 8.1  ("Dave North", )
     Re: Nested Loop "Killer" on 8.1  (Tom Lane, )

Greg Stark <> writes:
> On Wed, Jun 24, 2009 at 1:43 PM, Dave North<> wrote:
> Why use "like" for a constant string with no % or _ characters? If you
> used = the planner might be able to come up with a better estimate.

Uh, it appears to me the string *does* contain _ characters; perhaps the
OP has neglected to escape those?

The planner does know enough to estimate LIKE with a fixed pattern as
being equivalent to =.  I think it knew that even back in 8.1, but am
too lazy to look right now.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Janet Jacobsen
Дата:
Сообщение: slow DELETE on 12 M row table
От: Greg Stark
Дата:
Сообщение: Re: slow DELETE on 12 M row table