Re: index question
От | Jan Wieck |
---|---|
Тема | Re: index question |
Дата | |
Msg-id | 3F9DCD77.5060607@Yahoo.com обсуждение исходный текст |
Ответ на | index question ("Rick Gigger" <rick@alpinenetworking.com>) |
Список | pgsql-general |
Rick Gigger wrote: > I have heard that postgres will not use an index unless the field has a > not null constraint on it. Is that true? Certainly not. PostgreSQL reserves the right not to use an index, for example if it thinks that most of the table will satisfy the condition anyway (for example if a table has keys in the range from 1 to 1,000,000 and you query for > 1,000 ... using the index doesn't make sense). But claiming it will not use one if the field is allowed to contain NULL is plainly wrong. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #
В списке pgsql-general по дате отправления: