Re: [HACKERS] OR clause status report

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] OR clause status report
Дата
Msg-id 35C1C5A2.EAFC6C65@krs.ru
обсуждение исходный текст
Ответ на RE: [HACKERS] OR clause status report  (Vince Vielhaber <vev@michvhf.com>)
Ответы Re: [HACKERS] OR clause status report
Список pgsql-hackers
Vince Vielhaber wrote:
>
> Now I've been wondering why my selects are so slow.  Is this telling me
> that they're NOT using the index?  And if not, any ideas why?
>
> The select returned 35 rows out of approx 170,000.
>
> -----
> campsites=> explain select * from locations where lower(city)='oxford';
                                                    ^^^^^^^^^^^
You should

create index index_name on locations (lower(city))
                                      ^^^^^
- this is known as functional index...

> NOTICE:  QUERY PLAN:
>
> Seq Scan on locations  (cost=7263.30 size=84899 width=32)

Vadim

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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: RE: [HACKERS] OR clause status report
Следующее
От: Vince Vielhaber
Дата:
Сообщение: Re: [HACKERS] OR clause status report