ossc-db / pg_hint_plan

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

Cant get normalized text to work with pg plan hint #180

Closed fakdaddy75 closed 2 months ago

fakdaddy75 commented 3 months ago

Posted issue here. https://dba.stackexchange.com/questions/338270/performance-issue-cant-fix-with-pg-plan-hints

I can send code. I've tried 4-5 variations of the normalized text.

Tracing shows its not being matched in hint table on lookup.

fakdaddy75 commented 3 months ago

I have debugging enabled and also log_Satement_duration=0 Is there anyway to get the value of $1 here (from autoexplain with trace/debug)?

LOG: duration: 3.705 ms plan: Query Text: SELECT hints FROM hint_plan.hints WHERE norm_query_string = $1 AND ( application_name = $2 OR application_name = '' ) ORDER BY application_name DESC Sort (cost=11.31..11.31 rows=1 width=64) (actual time=3.244..3.245 rows=0 loops=1) Output: hints, application_name

If I can get the text its searching for - I can reverse engineer it.

michaelpq commented 2 months ago

If the link you are pointing to loses its contents, we'll have no way to know what action needs to be taken here. Please provide a self-contained test case for the problem you are pointing to.

FWIW, I see nothing really actionable here, so I'm closing this ticket out of information. #190 is not something that will be backpatched.