Re: Index not used when using a function

Поиск
Список
Период
Сортировка
От Nick
Тема Re: Index not used when using a function
Дата
Msg-id 99b4565d-94cc-4f87-9072-b65beadcdd51@34g2000yqp.googlegroups.com
обсуждение исходный текст
Ответ на Index not used when using a function  (Nick <nboutelier@gmail.com>)
Список pgsql-general
On Jan 13, 4:21 pm, t...@sss.pgh.pa.us (Tom Lane) wrote:
> Nick <nboutel...@gmail.com> writes:
> > SELECT * FROM locations WHERE id = 12345 LIMIT 1
> > uses the primary key (id) index, but...
> > SELECT * FROM locations WHERE id = get_location_id_from_ip(641923892)
> > LIMIT 1
> > does not and is verrry slow. Any ideas why?
>
> You didn't mark the function stable or immutable.http://www.postgresql.org/docs/8.4/static/xfunc-volatility.html
>
>                         regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

That was it, thank you.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Index not used when using a function
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: postgresql 8.1 windows 2008 64 bit