Search Postgresql Archives

Re: Index not used when using a function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 13, 4:21 pm, t...@xxxxxxxxxxxxx (Tom Lane) wrote:
> Nick <nboutel...@xxxxxxxxx> 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...@xxxxxxxxxxxxxx)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

That was it, thank you.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux