Commit 4938d63
authored
[opt](exec) skip result serialization for dry run queries (#63356)
### What problem does this PR solve?
Issue Number: N/A
Related PR: None
Problem Summary:
When dry_run_query is enabled, FE only needs the returned row count, but
BE still spends most of PhysicalResultSink time serializing MySQL result
rows In a local dry-run case against numbers("number"="1000000"), the
profile showed AppendBatchTime = 77.689ms, TupleConvertTime = 68.650ms,
and ResultSendTime = 2.702us, which means the dry-run path was still
paying almost the full result sink conversion cost.
This change keeps output expr evaluation intact, but returns early in
the MySQL result writers once the output block is produced in dry-run
mode. That preserves returned row accounting while skipping result
serialization, block copy, and sink enqueue work that dry-run queries
never consume.1 parent d5fb1e5 commit 4938d63
2 files changed
Lines changed: 26 additions & 3 deletions
File tree
- be
- src/exec/sink/writer
- test/core/data_type_serde
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
299 | 305 | | |
300 | 306 | | |
301 | 307 | | |
| |||
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| |||
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
89 | | - | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| |||
317 | 321 | | |
318 | 322 | | |
319 | 323 | | |
320 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
321 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
322 | 335 | | |
323 | 336 | | |
324 | 337 | | |
325 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
326 | 343 | | |
327 | 344 | | |
328 | 345 | | |
0 commit comments