Re: Putting an INDEX on a boolean field?

Поиск
Список
Период
Сортировка
От Marc G. Fournier
Тема Re: Putting an INDEX on a boolean field?
Дата
Msg-id 20050617020039.P90456@ganymede.hub.org
обсуждение исходный текст
Ответ на Re: Putting an INDEX on a boolean field?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Putting an INDEX on a boolean field?
Список pgsql-sql
On Fri, 17 Jun 2005, Tom Lane wrote:

> "Marc G. Fournier" <scrappy@postgresql.org> writes:
>> Does that make sense?  Would it ever get used?
>
> It could get used if one of the two values is far less frequent than the
> other.  Personally I'd think about a partial index instead ...

Hrmmmm, hadn't thought of that ... wouldn't you have to build two indexes 
(one for true, one for false) for this to be completely effective?  unless 
you know all your queries are going to search for one, but not the other?

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Putting an INDEX on a boolean field?
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: Putting an INDEX on a boolean field?