How to use hints like " /*+ NestLoop(a e) */ " for PostgreSQL

Hi, I'm using https://osdn.net/projects/pghintplan/ to control query plan. This extension provides support of query hints. Hints have simple format, they are like comments which started with " /*+ ". For example:

/*+ NestLoop(a e) */explain analyse

select a.email, e.created_at
from actor a
join execution e on a.id = e.actor_id
where e.stage_id = 2

 This statement should force to use Nested Loop and it works in console, pgAdmin:

But not in DataGrip. It looks like DataGrip exclude comment from statement and i have Hash Join:

How can I use such hints in DataGrip for PostgreSQL? I've founded only this empty issue https://youtrack.jetbrains.com/issue/DBE-3691

 

Thanks for any help,

Nikolay

2
1 comment
Avatar
Permanently deleted user

only way to force datagrip to include hints is to add explain analyse above it. It would be extremely helpful if hints could be part of a normal execution/

0

Please sign in to leave a comment.