diff --git a/pkg/server/combined_statement_stats.go b/pkg/server/combined_statement_stats.go index 856368acc16e..0a49d9a26e62 100644 --- a/pkg/server/combined_statement_stats.go +++ b/pkg/server/combined_statement_stats.go @@ -545,7 +545,7 @@ func getTotalStatementDetails( args = append(args, aggregatedMetadata.Query) query = fmt.Sprintf( `SELECT prettify_statement($1, %d, %d, %d)`, - tree.ConsoleLineWidth, tree.PrettyAlignAndDeindent, tree.UpperCase) + tree.ConsoleLineWidth, tree.PrettyAlignOnly, tree.UpperCase) row, err = ie.QueryRowEx(ctx, "combined-stmts-details-format-query", nil, sessiondata.InternalExecutorOverride{ User: username.NodeUserName(), diff --git a/pkg/ui/workspaces/cluster-ui/src/api/insightsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/insightsApi.ts index 81e8359fb3f3..37a6716419ff 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/insightsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/insightsApi.ts @@ -166,7 +166,7 @@ type FingerprintStmtsResponseColumns = { const fingerprintStmtsQuery = ( stmt_fingerprint_ids: string[], ) => `SELECT DISTINCT ON (fingerprint_id) encode(fingerprint_id, 'hex') AS statement_fingerprint_id, - prettify_statement(metadata ->> 'query', 108, 2, 1) AS query + prettify_statement(metadata ->> 'query', 108, 1, 1) AS query FROM crdb_internal.statement_statistics WHERE encode(fingerprint_id, 'hex') = ANY (string_to_array('${stmt_fingerprint_ids}' , ','))`; @@ -648,7 +648,7 @@ const statementInsightsQuery: InsightQuery< > = { name: InsightNameEnum.highContention, // We only surface the most recently observed problem for a given statement. - query: `SELECT *, prettify_statement(non_prettified_query, 108, 2, 1) AS query from ( + query: `SELECT *, prettify_statement(non_prettified_query, 108, 1, 1) AS query from ( SELECT session_id, txn_id,