Re: Subquery WHERE IN or WHERE EXISTS faster?

От: Tom Lane
Тема: Re: Subquery WHERE IN or WHERE EXISTS faster?
Дата: ,
Msg-id: 29009.1214668423@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Subquery WHERE IN or WHERE EXISTS faster?  (Ulrich)
Ответы: Re: Subquery WHERE IN or WHERE EXISTS faster?  (Ulrich)
Re: Subquery WHERE IN or WHERE EXISTS faster?  ("Jaime Casanova")
Список: pgsql-performance

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

Subquery WHERE IN or WHERE EXISTS faster?  (Ulrich, )
 Re: Subquery WHERE IN or WHERE EXISTS faster?  (Tom Lane, )
  Re: Subquery WHERE IN or WHERE EXISTS faster?  (Ulrich, )
   Re: Subquery WHERE IN or WHERE EXISTS faster?  (Gregory Stark, )
    Re: Subquery WHERE IN or WHERE EXISTS faster?  (Ulrich, )
     Re: Subquery WHERE IN or WHERE EXISTS faster?  (Gregory Stark, )
   Re: Subquery WHERE IN or WHERE EXISTS faster?  (Rusty Conover, )
    Re: Subquery WHERE IN or WHERE EXISTS faster?  (Ulrich, )
     Re: Subquery WHERE IN or WHERE EXISTS faster?  (Rusty Conover, )
      Re: Subquery WHERE IN or WHERE EXISTS faster?  ("Sergio Gabriel Rodriguez", )
   Re: Subquery WHERE IN or WHERE EXISTS faster?  ("Sergio Gabriel Rodriguez", )
  Re: Subquery WHERE IN or WHERE EXISTS faster?  ("Jaime Casanova", )
   Re: Subquery WHERE IN or WHERE EXISTS faster?  (Tom Lane, )

Ulrich <> writes:
> People say that [EXISTS is faster]

People who say that are not reliable authorities, at least as far as
Postgres is concerned.  But it is always a bad idea to extrapolate
results on toy tables to large tables --- quite aside from measurement
noise and caching issues, the planner might pick a different plan when
faced with large tables.  Load up a realistic amount of data and then
see what you get.

            regards, tom lane


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

От: "Steinar H. Gunderson"
Дата:
Сообщение: Re: Planner should use index on a LIKE 'foo%' query
От: Ulrich
Дата:
Сообщение: Re: Subquery WHERE IN or WHERE EXISTS faster?