Search Postgresql Archives

bug or lacking doc hint

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

 



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


[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux