From: | Matt Harrison <groovefillet(at)gmail(dot)com> |
---|---|
To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: enabling join_collapse_limit for a single query only |
Date: | 2009-07-23 10:11:19 |
Message-ID: | DAD3D789-16B6-48F5-92D9-374F3B0F94E1@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi, and thanks for the reply.
We're issuing queries from within our application where transactions
span a whole unit of work, so wrapping a single query in a transaction
just to set the param isn't really feasible except on a separate
connection, which i am loathe to do.
I was really hoping to be able to set join_collapse_limit=1 *just* on
the single query, as a kind of query hint, eg:
/* !hint:join_collapse_limit=1 */ SELECT ...
I take it this is this not possible in postgres?
cheers,
Matt h
On 23/07/2009, at 09:50, Albe Laurenz wrote:
> groovefillet wrote:
>> Is it possible to set the runtime parameter 'join_collapse_limit' for
>> a single query only without setting/unsetting it before/after?
>
> Yes:
>
> START TRANSACTION;
>
> SET LOCAL join_collapse_limit = 42;
>
> SELECT .....
>
> COMMIT;
>
> Yours,
> Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Jasen Betts | 2009-07-23 10:47:40 | Re: problem with pg_restore? |
Previous Message | Albe Laurenz | 2009-07-23 08:50:52 | Re: enabling join_collapse_limit for a single query only |