Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)

Список
Период
Сортировка
От Tom Lane
Тема Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)
Дата
Msg-id 23152.1112918336@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  (Mischa)
Ответы Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  ()
Список pgsql-performance
Дерево обсуждения
Plan for relatively simple query seems to be very inefficient  (Arjen van der Meijden, )
 Re: Plan for relatively simple query seems to be very inefficient  (Steve Atkins, )
  Re: Plan for relatively simple query seems to be very inefficient  (Arjen van der Meijden, )
 Re: Plan for relatively simple query seems to be very inefficient  (Tom Lane, )
  Re: Plan for relatively simple query seems to be very inefficient  (Arjen van der Meijden, )
   Re: Plan for relatively simple query seems to be very inefficient  (Tom Lane, )
    Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  (Tom Lane, )
     Re: [HACKERS] Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  ("Jim C. Nasby", )
      Re: [HACKERS] Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  (Tom Lane, )
       Re: [HACKERS] Recognizing range constraints (was Re: Plan  (John A Meinel, )
        Re: [HACKERS] Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  (Tom Lane, )
       Re: [HACKERS] Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  ("Jim C. Nasby", )
     Re: Recognizing range constraints (was Re: Plan for  (Simon Riggs, )
     Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  (Bruno Wolff III, )
      Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  (Tom Lane, )
       Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  (Mischa, )
        Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  (Tom Lane, )
         Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)  (, )
 Re: Plan for relatively simple query seems to be very inefficient  ("Dave Held", )
  Re: Plan for relatively simple query seems to be very inefficient  (Tom Lane, )
  Re: Plan for relatively simple query seems to be very inefficient  (Tom Lane, )
 Re: Plan for relatively simple query seems to be very inefficient  (Mischa, )
Mischa <> writes:
> Quoting Tom Lane <>:
>> WHERE a.x > b.y AND a.x < 42

> Out of curiosity, will the planner induce "b.y < 42" out of this?

No.  There's some smarts about transitive equality, but none about
transitive inequalities.  Offhand I'm not sure if it'd be useful to add
such.  The transitive-equality code pulls its weight because you so
often have situations like

    create view v as select a.x, ... from a join b on (a.x = b.y);

    select * from v where x = 42;

but I'm less able to think of common use-cases for transitive
inequality ...

            regards, tom lane

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: [HACKERS] Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: help on explain analyse in psql 7.1.3 (linux)