Skip to content

Commit 1b98079

Browse files
craig[bot]maryliag
craig[bot]
andcommitted
Merge #89020
89020: sql: turn plan sampling back on by default r=maryliag a=maryliag This value was disabled by default on #88343 but brought visibility to a bug of statements not being properly trace when they should be on the first time. Since we might not be able to finish the proper fix before the cut on backports, I'm turning back on and a following commit can turn this back off and add the fix for the problem. Release note (sql change): Turn the default value of `sql.metrics.statement_details.plan_collection.enabled` to `true` Co-authored-by: Marylia Gutierrez <[email protected]>
2 parents 6850a6e + 62f5d86 commit 1b98079

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/generated/settings/settings-for-tenants.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ sql.metrics.statement_details.enabled boolean true collect per-statement query s
253253
sql.metrics.statement_details.gateway_node.enabled boolean true save the gateway node for each statement fingerprint. If false, the value will be stored as 0.
254254
sql.metrics.statement_details.index_recommendation_collection.enabled boolean true generate an index recommendation for each fingerprint ID
255255
sql.metrics.statement_details.max_mem_reported_idx_recommendations integer 5000 the maximum number of reported index recommendation info stored in memory
256-
sql.metrics.statement_details.plan_collection.enabled boolean false periodically save a logical plan for each fingerprint
256+
sql.metrics.statement_details.plan_collection.enabled boolean true periodically save a logical plan for each fingerprint
257257
sql.metrics.statement_details.plan_collection.period duration 5m0s the time until a new logical plan is collected
258258
sql.metrics.statement_details.threshold duration 0s minimum execution time to cause statement statistics to be collected. If configured, no transaction stats are collected.
259259
sql.metrics.transaction_details.enabled boolean true collect per-application transaction statistics

docs/generated/settings/settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
<tr><td><code>sql.metrics.statement_details.gateway_node.enabled</code></td><td>boolean</td><td><code>true</code></td><td>save the gateway node for each statement fingerprint. If false, the value will be stored as 0.</td></tr>
188188
<tr><td><code>sql.metrics.statement_details.index_recommendation_collection.enabled</code></td><td>boolean</td><td><code>true</code></td><td>generate an index recommendation for each fingerprint ID</td></tr>
189189
<tr><td><code>sql.metrics.statement_details.max_mem_reported_idx_recommendations</code></td><td>integer</td><td><code>5000</code></td><td>the maximum number of reported index recommendation info stored in memory</td></tr>
190-
<tr><td><code>sql.metrics.statement_details.plan_collection.enabled</code></td><td>boolean</td><td><code>false</code></td><td>periodically save a logical plan for each fingerprint</td></tr>
190+
<tr><td><code>sql.metrics.statement_details.plan_collection.enabled</code></td><td>boolean</td><td><code>true</code></td><td>periodically save a logical plan for each fingerprint</td></tr>
191191
<tr><td><code>sql.metrics.statement_details.plan_collection.period</code></td><td>duration</td><td><code>5m0s</code></td><td>the time until a new logical plan is collected</td></tr>
192192
<tr><td><code>sql.metrics.statement_details.threshold</code></td><td>duration</td><td><code>0s</code></td><td>minimum execution time to cause statement statistics to be collected. If configured, no transaction stats are collected.</td></tr>
193193
<tr><td><code>sql.metrics.transaction_details.enabled</code></td><td>boolean</td><td><code>true</code></td><td>collect per-application transaction statistics</td></tr>

pkg/sql/sqlstats/cluster_settings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var SampleLogicalPlans = settings.RegisterBoolSetting(
6565
settings.TenantWritable,
6666
"sql.metrics.statement_details.plan_collection.enabled",
6767
"periodically save a logical plan for each fingerprint",
68-
false,
68+
true,
6969
).WithPublic()
7070

7171
// LogicalPlanCollectionPeriod specifies the interval between collections of

0 commit comments

Comments
 (0)