Re: 2 json explain plans for the same query/plan - why does one have constants while the other has parameter markers?

2023-12-08 Thread Jerry Brenner
Thanks for the quick response! That was very helpful! My impression is that almost all of the plans being captured are "custom", but now I know that I need to look closer. We also store the execution times, so we can look at the execution order for queries that are executed often enough to seem l

Re: Question about semantics of $ variables in json explain plans in 13

2023-12-08 Thread Tom Lane
Jerry Brenner writes: > Is there any documentation on the semantics of $ variables in json explain > plans for both InitPlans and SubPlans in 13? I don't think there's anything much in the user-facing docs, which is somewhat unfortunate because it's confusing: the notation is overloaded. $N could

Re: 2 json explain plans for the same query/plan - why does one have constants while the other has parameter markers?

2023-12-08 Thread Tom Lane
Jerry Brenner writes: > We are currently on 13. We are capturing the explain plans for query > executions taking 1 second or longer and storing the json files. We are > most of the way through implementing a home grown solution to generate a > consistent hash value for a query plan, so we can fi

2 json explain plans for the same query/plan - why does one have constants while the other has parameter markers?

2023-12-08 Thread Jerry Brenner
We are currently on 13. We are capturing the explain plans for query executions taking 1 second or longer and storing the json files. We are most of the way through implementing a home grown solution to generate a consistent hash value for a query plan, so we can find queries with multiple plans.

Question about semantics of $ variables in json explain plans in 13

2023-12-08 Thread Jerry Brenner
Is there any documentation on the semantics of $ variables in json explain plans for both InitPlans and SubPlans in 13? I'm trying to understand the attached json file. - It looks like $0 represents the value from the outer query block when the correlated subquery is evaluated - It looks