ossc-db / pg_hint_plan

Extension adding support for optimizer hints in PostgreSQL
Other
674 stars 101 forks source link

Specify build and probe tables to hash join possible? #146

Closed Asoke26 closed 10 months ago

Asoke26 commented 11 months ago

This is an example query --

/+ HashJoin(it mi_idx) / EXPLAIN ANALYZE SELECT COUNT(*) FROM info_type AS it, movie_info_idx AS mi_idx WHERE it.id = mi_idx.info_type_id;

I want to build Hash on table (mi_idx). But PostgreSQL is building hash on table (it) I am wondering if there is a way to control build and probe tables to hash join. Thanks.

michaelpq commented 11 months ago

Could you provide a self-contained test case of what you are trying to achieve and what pg_hint_plan is giving you? With a single query, it is kind of hard to figure out your case and how it could be possible to improve things.

michaelpq commented 10 months ago

Closing this issue as this is not really a bug. If you think that is a bug that should be fixed, please provide a test case and what you would expect the result to be.