Hi,
I have had a perf (++) pb with a join plan cf the pb with join plan thread.
I did simplify the thing up to when its a simple join between a 15M lines table and a 30k lines table.
if I put in the on part something like table1.a=table2.b, Postgres does the job in around 1 seconde.
if in the on part of the join I write table1.a=table2.b OR substr(table1.c,x,x) =table2.d
then I have to cancel the request after 20 minutes seeing disk usage growing and growing.
When I ask this list, David Rowley suggest to rewrite the SQL, replacing the OR by a union.
Fine, this do work, even if a bit complex as the original SQL was a set of intricate joins.
So, either this behaviour ( postgres unable to find an appropriate plan for join with OR clauses)
is a true bug which is waiting to be corrected, either the doc is lacking a chapter on which one can read that Postgres does NOT support that syntax as soon as there is some data volumes.
So, now I am writing some kind of recipe book for the users of that DB.
What should I write ?
Marc MILLAS
Senior Architect
+33607850334