Announcement

Migration of this forum

Dear users of this forum,

we are pleased to inform you that we will be updating the software behind this forum in the near future.

Existing posts, users and categories will remain untouched.

Important:

  • Each user will need to reset their password.
  • Please select "I forgot my password".
  • Enter the email address you used to register in this forum.
  • You will receive an email with a link to set a new password.
  • Please choose a new (secure) password and confirm the process.

We will keep you informed in the pinned thread.

Kind regards,
Your ReportServer Team


Migration des Forums

Liebe Nutzer dieses Forums,

wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.

Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!

Wichtig:

  • Jeder Nutzer muss sein Passwort neu vergeben.
  • Wählt dazu einfach "Ich habe mein Passwort vergessen".
  • Gebt die E-Mail-Adresse ein, mit der ihr registriert seid.
  • Ihr erhaltet eine E-Mail mit einem Link zur Passwortvergabe.
  • Bitte wählt ein neues (sicheres) Passwort und bestätigt den Vorgang.

Wir halten euch im angepinnten Beitrag auf dem Laufenden!

Mit vielen Grüßen
Euer ReportServer Team

#1 2019-11-18 09:10:29

asmirnov
Member
Registered: 2018-06-05

PostgreSQL SET LOCAL in dynamic list

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

#2 2019-11-18 09:33:24

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: PostgreSQL SET LOCAL in dynamic list

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

#3 2019-11-18 09:53:10

asmirnov
Member
Registered: 2018-06-05

Re: PostgreSQL SET LOCAL in dynamic list

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

#4 2019-11-18 09:56:39

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: PostgreSQL SET LOCAL in dynamic list

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

#5 2019-11-18 09:59:37

asmirnov
Member
Registered: 2018-06-05

Re: PostgreSQL SET LOCAL in dynamic list

Yes, right

Offline

#6 2019-11-18 10:04:17

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: PostgreSQL SET LOCAL in dynamic list

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

#7 2019-11-18 10:55:04

asmirnov
Member
Registered: 2018-06-05

Re: PostgreSQL SET LOCAL in dynamic list

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

#8 2019-11-19 07:54:25

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: PostgreSQL SET LOCAL in dynamic list

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

#9 2019-12-13 12:20:32

asmirnov
Member
Registered: 2018-06-05

Re: PostgreSQL SET LOCAL in dynamic list

eduardo wrote:

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

#10 2020-03-18 08:23:45

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: PostgreSQL SET LOCAL in dynamic list

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

Board footer

Powered by FluxBB