Hacker News new | ask | show | jobs
by th3iedkid 818 days ago
Isn’t hinting more like asking nicely than forcing the engine to choose the other way?
3 comments

It's a bit of both. What pg_hint_plan does is change the cost to favour the hinted suggestion. If hinted suggestion is impossible, the planner will still perform something else.
But if 'force' means changing what it would do otherwise, where 'otherwise' is: a different plan having the lowest cost, the: yes that is exactly what it does.
Yeah, I probably could have used better wording for the title submission.

The GitHub repo's wording is broken english currently though which is (probably?) worse.

I’ll try to do something about that tomorrow, saw your ticket.
No worries at all. :)
you can’t really do the latter.