Re: Postgresql equal join on function with columns not use index

2023-06-13 Thread Pavel Stehule
út 13. 6. 2023 v 16:17 odesílatel Pavel Stehule napsal: > > > út 13. 6. 2023 v 15:50 odesílatel Tom Lane napsal: > >> "James Pang (chaolpan)" writes: >> > Looks like it's the function "regexp_replace" volatile and >> restrict=false make the difference, we have our application role with >>

Re: Postgresql equal join on function with columns not use index

2023-06-13 Thread Pavel Stehule
út 13. 6. 2023 v 15:50 odesílatel Tom Lane napsal: > "James Pang (chaolpan)" 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. > > =#se

Re: Postgresql equal join on function with columns not use index

2023-06-13 Thread Tom Lane
"James Pang (chaolpan)" 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,prosec

Re: extended statistics n-distinct on multiple columns not used when join two tables

2023-06-13 Thread Pavel Stehule
Hi út 13. 6. 2023 v 11:21 odesílatel James Pang (chaolpan) napsal: > Hi, > > When join two table on multiple columns equaljoin, rows estimation > always use selectivity = multiplied by distinct multiple individual > columns, possible to use extended n-distinct statistics on multiple > colu

extended statistics n-distinct on multiple columns not used when join two tables

2023-06-13 Thread James Pang (chaolpan)
Hi, When join two table on multiple columns equaljoin, rows estimation always use selectivity = multiplied by distinct multiple individual columns, possible to use extended n-distinct statistics on multiple columns? PG v14.8-1, attached please check test case with details. Thanks, Jam