Project Description Developer Dashboard Web Page Review this project

PostgreSQL executes queries using cost-based optimizer, and sometimes fails to choose most optimized execution plan or some types of queries. In such cases, pg_hint_plan helps users to guide the planner to choose the plans they want by putting some nstructions - call them hints - in the comments prefixed to the SQL statement body. No need to rewrite statement tself nor change some GUC parameters elsewhere.

System Requirements

PostgreSQL 9.1, 9.2


pg_hint_planをソースコードからビルドする場合、pg_hint_planのソースを展開したディレクトリで make → make installの順に実行してください。 make installはPostgreSQLをインストールしたOSユーザで実行してく... Show How to Install


pg_hint_planの機能について説明します。 ヒントの記述方法 ヒントはクエリ文字列の先頭のブロックコメント内に記述してください。ブロックコメントをヒントとして認識させるには、ブロックコメントの開始直後に... Show Usage

Your rating
Review this project


2015-02-09 14:14
Review by Mladen Gogala

(4 of 4 people found this review helpful)
I tested this on a Postgres database and hints work beautifully. This is a long awaited extension for PgSQL which makes it much more usable.
When time is of the essence, hints are often the only solution. The normal session level commands supported by Postgres are frequently inadequate because all that is needed is to fix a single SQL. Praises and kudos to the authors of this long awaited extension.
No cons. If the hints are not needed, don't use them.
Review List

Recent Activities

Use planner hints on PostgreSQL
[Git] commits were pushed to 'pg_hint_plan' (current: e701eee8123682aae4fec5dc9639b50a54eb0b35)
Don't apply parallel hint on rels that planner considers unsafe. pg_hint_plan considered had its...
Use planner hints on PostgreSQL
[Git] commits were pushed to 'pg_hint_plan' (current: c43304db0df8b36ebf1ad205697789d1ff6c36ff)
Reconsider hinting process I rethinked the steps of enforcement considering the parallel plannin...
Use planner hints on PostgreSQL
[Git] commits were pushed to 'pg_hint_plan' (current: beb606750700a71618beee99a8cb65e9d81fab51)
Don't set_plain_rel_pathlist for other than RTE_RELATION. pg_hint_plan_set_rel_pathlist can call...
Use planner hints on PostgreSQL
[Git] commits were pushed to 'pg_hint_plan' (current: 5a72d7cc92b30c58849def207a027beac6a70930)
Refactor hint application mechamism next step I removed useless code forgotten to be removed in ...
Use planner hints on PostgreSQL
[Git] commits were pushed to 'pg_hint_plan' (current: a5663e67fa77a613ab3dbf49cdbc698239ab848d)
Refactor hint application mechamism Before we have the new hook set_rel_pathlist_hook, plan enfo...
Show history