Re: What is the fastest null WHERE

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: What is the fastest null WHERE
Дата
Msg-id 200310011339.01707.dev@archonet.com
обсуждение исходный текст
Ответ на What is the fastest null WHERE  ("Mindaugas Riauba" <mind@bi.lt>)
Список pgsql-performance
On Wednesday 01 October 2003 13:11, Mindaugas Riauba wrote:
>   Hello,
>
>   While writing web application I found that it would
> be very nice for me to have "null" WHERE clause. Like
> WHERE 1=1. Then it is easy to concat additional
> conditions just using $query . " AND col=false" syntax.
>
>   But which of the possible "null" clauses is the fastest
> one?

I suspect WHERE true, but is it really necessary.

Most languages will have a join() operator that lets you do something like:

$where_cond = join(' AND ', @list_of_tests)



--
  Richard Huxton
  Archonet Ltd

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

Предыдущее
От: Shridhar Daithankar
Дата:
Сообщение: Re: What is the fastest null WHERE
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: What is the fastest null WHERE