From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "James Pang (chaolpan)" <chaolpan(at)cisco(dot)com> |
Cc: | "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Postgresql equal join on function with columns not use index |
Date: | 2023-06-13 13:50:48 |
Message-ID: | 1527099.1686664248@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
"James Pang (chaolpan)" <chaolpan(at)cisco(dot)com> writes:
> Looks like it's the function "regexp_replace" volatile and restrict=false make the difference, we have our application role with default search_path=oracle,$user,public,pg_catalog.
> =# select oid,proname,pronamespace::regnamespace,prosecdef,proisstrict,provolatile from pg_proc where proname='regexp_replace' order by oid;
> oid | proname | pronamespace | prosecdef | proisstrict | provolatile
> -------+----------------+--------------+-----------+-------------+-------------
> 2284 | regexp_replace | pg_catalog | f | t | i
> 2285 | regexp_replace | pg_catalog | f | t | i
> 17095 | regexp_replace | oracle | f | f | v
> 17096 | regexp_replace | oracle | f | f | v
> 17097 | regexp_replace | oracle | f | f | v
> 17098 | regexp_replace | oracle | f | f | v
Why in the world are the oracle ones marked volatile? That's what's
preventing them from being used in index quals.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2023-06-13 14:17:59 | Re: Postgresql equal join on function with columns not use index |
Previous Message | James Pang (chaolpan) | 2023-06-13 11:32:54 | RE: extended statistics n-distinct on multiple columns not used when join two tables |