Matching a large number of user chosen

Поиск
Список
Период
Сортировка
От John Taylor
Тема Matching a large number of user chosen
Дата
Msg-id 02041210484101.01886@splash.hq.jtresponse.co.uk
обсуждение исходный текст
Ответы Re: Matching a large number of user chosen  (Rob <rob@obsidian.co.za>)
Список pgsql-novice
Hi,

I have an application where a user can choose a large number of distinct products to process.

The SQL that I currently use looks something like this:

select * from products where date='01012000' AND ( id='123' OR id='456' OR id='789' );

There can be maybe hundreds of different unconnected id's chosen.

Is there a more elegant/efficient way to do this than a large number of ORs ?

Thanks
JohnT

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

Предыдущее
От: Rob
Дата:
Сообщение: Update function
Следующее
От: Rob
Дата:
Сообщение: Re: Matching a large number of user chosen