WHERE clause with 40+ conditions

Поиск
Список
Период
Сортировка
От DrYSG
Тема WHERE clause with 40+ conditions
Дата
Msg-id 1336156311624-5686659.post@n5.nabble.com
обсуждение исходный текст
Ответы Re: WHERE clause with 40+ conditions  (Binand Sethumadhavan <binand@gmx.net>)
Re: WHERE clause with 40+ conditions  (Daniel Staal <DStaal@usa.net>)
Список pgsql-novice
My users are presented with a list of checkbox for 4 different attributes
(e.g. type of image, country, etc.)

For type of image they can choose JPG, PNG, JP2000, etc. or turn off the
check box.

My naive implementation would have a WHERE clause with over 40 different
tests (type='JPG' OR type='PNG' OR country='USA' ...)

There has to be an more efficient way to do this (and gives better hints to
the PLANNER).

Suggestions?



--
View this message in context: http://postgresql.1045698.n5.nabble.com/WHERE-clause-with-40-conditions-tp5686659.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Import CSV with Dates & Times
Следующее
От: Binand Sethumadhavan
Дата:
Сообщение: Re: WHERE clause with 40+ conditions