Re: Very long "or" where clause

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Very long "or" where clause
Дата
Msg-id 45ACA3CB.4070503@archonet.com
обсуждение исходный текст
Ответ на Re: Very long "or" where clause  (Scara Maccai <m_lists@yahoo.it>)
Список pgsql-general
Scara Maccai wrote:
>> Put the test-values into a temporary table, analyse it and then join
>> against it.
>
> Ok, I didn't think of it.
>
>> Can't say about indexes without knowing more about your usage pattern.
>
>
> What do you mean?

You might want an index on time, id, (id,time) or (time,id) - depends on
how many OR clauses there are typically and how many distinct values
there are for "time" and "id".

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Scara Maccai
Дата:
Сообщение: Re: Very long "or" where clause
Следующее
От: Max Ueda
Дата:
Сообщение: Coercion in PGSQL?