You are not logged in.
Pages: 1
I need to tune query with incorrect estimate from query planner and would like to set transaction level parameter in postgresql (SET LOCAL ENABLE_NESTLOOP TO FALSE) in the same transaction as query, or at least SET ENABLE_NESTLOOP TO FALSE in the session. Reportserver covers queries inside external select, so i cannot put set to query text, can I define string to be executed before that select for example, or do it different way?
Offline
Hi asmirnov,
can you please post an example of how the adapted query should look like? where exactly do you need these parameters?
Regards,
Eduardo
Offline
Hi Eduardo,
Similar to following:
SET LOCAL ENABLE_NESTLOOP TO FALSE;
Select * from some_big_query_with_lots_of_joins
That means I forbid using nested loop join for current transaction (query).
For this certain query this setting makes it work much faster
Offline
Hi asmirnov,
and "Select * from some_big_query_with_lots_of_joins" is the query created by reportserver, where you see your query as an internal query, correct?
Regards,
Eduardo
Offline
Yes, right
Offline
Hi asmirnov,
we have ticket RS-2406 for allowing to adapt the dynamic list query before its execution. So this would help you in this case.
I have prioritized this issue and will let you know when this feature is available.
Currently, the query created by reportserver can not be modified.
Regards,
Eduardo
Offline
Thank you Eduardo
Probably there are some other ways, for example execute SET statement on session level on the connection initialize, or using hook in the report?
Offline
Hi asmirnov,
maybe you can set this in your postgres.conf file or via jdbc url parameter. Can you please check this?
Regards,
Eduardo
Offline
Hi asmirnov,
maybe you can set this in your postgres.conf file or via jdbc url parameter. Can you please check this?
Regards,
Eduardo
Finally, we disabled server-level parameter. It won;t work always, but mostly Ok in our case.
Offline
Hi asmirnov,
just a quick information:
we are looking into this in ticket RS-3994. The other ticket number I mentioned is a similar issue, but it doesn't solve your problem.
Regards,
Eduardo
Offline
Pages: 1