Re: indexes

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: indexes
Дата
Msg-id 20020206072840.L16466-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на indexes  (Isabelle Brette <isabelle@apartia.fr>)
Список pgsql-sql
On Tue, 5 Feb 2002, Isabelle Brette wrote:

> As you may also guess, making straight indexes does not work (I still
> have this damn Seq Scan while EXPLAINing). For the date, I tried this :
>
>     create index sess_created on sessions (to_char(created,'YYYY/MM'));
>
> but I get a parse error near "'". What do I have wrong, as the query
> seems right ? Is it because of the non-column argument ?

For a functional index that you want to pass constants to, right now you'd
need to make a cacheable function that takes created in this case and
returns the to_char(created, 'YYYY/MM') and then use that in the index and
query.



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

Предыдущее
От: Isabelle Brette
Дата:
Сообщение: Re: indexes
Следующее
От: Evil Azrael
Дата:
Сообщение: Query with Parameters