Re: [HACKERS] Big join breaks psql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Big join breaks psql
Date
Msg-id 23841.951236424@sss.pgh.pa.us
Whole thread Raw
In response to Big join breaks psql  (Alessio Bragadini <alessio@albourne.com>)
List pgsql-hackers
Alessio Bragadini <alessio@albourne.com> writes:
> The following (rather long) query run fine for some time when executed
> through Micro$oft Query via Psqlodbc. We never tried it under psql.
> Today it appeared broken (some trickery on the Excel worksheet seems to
> have fix that) and for the first time I tried to run it from the command
> line. I never managed, psql always breaks in the same way:

Try doingset ksqo = 'on';
in psql before you run the query.  I think the ODBC driver does that for
you automatically.

The regular 6.5 optimizer tends to blow up when faced with large
OR-of-ANDs WHERE clauses.  7.0 will be a lot better about it...
but in the meantime you need the KSQO hack.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: [PATCHES] Patch for more readable parse error messages
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Beta for 4:30AST ... ?