Comments (3)
The repor doesn't work for me, with any ordering of the two extensions in shared_preload_libraries and both -f or not. Do you suppose some other conditions for the behavior?
from pg_hint_plan.
Hi, I'm sorry for confusing you.
I could not reproduce this issue even if I follow the procedure in my first post..
So, I write the simple procedure to reproduce. I use pg_hint_plan REL95_1_1_8 and PostgreSQL 9.5.21.
- Initial setup by following my first post.
- Execute following command:
psql -c "EXPLAIN SELECT /*+ MergeJoin(t1 t2) */ T1.C1,T2.C1 FROM S1.T1,S1.T2 WHERE T1.C1=T2.C1;"
I confirm not Merge Join but Hash Join from explain information of 2.
[ A little investigation ]
When new session starts, pg_dbms_stats needs to search "locked statistics" tables, I think.
If so, this behavior is similar to the following comment of commit 000c325.
Hints lose effect when pg_dbms_stats searches "locked statistics" tables
while planning the target query.
from pg_hint_plan.
OK, I confirmed that when both pg_hint_plan and pg_dbms_stats are preloaded, running the given query as the first query in a session doesn't honor the hint. Some digging on the repository told me that a change committed fife years ago (9.4 era) have broken the previous behavior.
Fixed it. Patched from PG94 up to master (PG12).
from pg_hint_plan.
Related Issues (20)
- Does pg_hint_plan support "unnamed_subquery" added as part of PG 16 ? HOT 1
- Instability of pg_hint_plan.sql test in PG16 + master on a slow box (or when testing with valgrind). HOT 1
- SIGABRT when the parse_messages parameter equals to error. HOT 1
- Regression with Parallel hints combined with removal of indexes in Index hints HOT 10
- enable_self_join_removal in 17 breaks regression tests that use self-joins HOT 1
- Is it possible to inject each operator's cardinality by hint 'Rows' ? HOT 1
- Scan and Join hints do not work as expected HOT 6
- Installation of pg_hint_plan failed for Enterprise DB 14.x HOT 4
- pg_hint_plan whether support for hints for group by method(hash/sort)? HOT 1
- make hint relname comparison case insensitive HOT 1
- Tolerating preceding single-line comments HOT 3
- Hint to use a Nested Loop Semi Join HOT 1
- Improved repository description? HOT 9
- Cant get normalized text to work with pg plan hint HOT 2
- Maskout script doesn't work on macOS HOT 2
- Hint table doesn't seem to have effect on query plans HOT 7
- Hints do not work on subqueries with DISTINCT
- Next release of pg_hint_plan with PostgreSQL 17 compatibility HOT 27
- Query Errors if pg_hint_plan.enable_hint_table and enable_hint is enabled but hints table does not exist HOT 15
- Discrepancy in the costs of prepared operators depending on the architecture of the system HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg_hint_plan.