What Ryota has reported so far —in plain terms
Symptom he reproduced
Running the query with dozens of hard-coded literal values in the SELECT list takes ≈ 29 seconds.
Commenting-out those literals (same table, same filters) drops execution time to ≈ 4 seconds.
Root-cause he identified
When literals are present, Synapse rewrites the statement and injects many CAST() conversions so the output columns all share a compatible data type.
Those implicit conversions show up in the XML execution plan and add significant CPU/IO, which explains the slowdown.
Status of his internal checks
He is validating the behaviour with a colleague (Savinda) and capturing the evidence (slow vs. fast plans).
He plans to tell the customer that these extra CAST() steps are the reason the query is slower.
Help he is asking for
“If processing becomes slow because of these CASTs, is there any way to keep performance fast even when constants are included?
If there is, please let me know so I can advise the customer (CX).”
In short: Ryota has pinpointed the performance hit to Synapse’s automatic data-type conversions caused by constants, and he wants guidance or a workaround that will let the customer keep those constants without paying the 7-× time penalty.
视频信息
答案文本
视频字幕
Ryota has discovered a significant database performance issue. When running a query with dozens of hard-coded literal values in the SELECT list, execution time jumps to 29 seconds. However, when those same literals are commented out from the identical query with the same table and filters, execution time drops dramatically to just 4 seconds. This represents a seven-fold performance degradation that's affecting the customer's Azure Synapse database operations.