1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Comment improvements to on the distinct-agg optimization. Show a line in

the EQP output when using an ephemeral table to implement DISTINCT on an
aggregate.

FossilOrigin-Name: 037ca79e6032ca962b4f6182187bc12a7d91170d73630c8cd6fb191d2c183ee4
This commit is contained in:
drh
2021-03-24 19:44:01 +00:00
parent 6db1c9da67
commit 9be1339faf
4 changed files with 43 additions and 34 deletions

View File

@ -30,12 +30,11 @@ proc is_distinct_noop {sql} {
set program1 [list]
set program2 [list]
db eval "EXPLAIN $sql1" {
if {$opcode != "Noop"} { lappend program1 $opcode }
if {$opcode != "Noop" && $opcode != "Explain"} { lappend program1 $opcode }
}
db eval "EXPLAIN $sql2" {
if {$opcode != "Noop"} { lappend program2 $opcode }
if {$opcode != "Noop" && $opcode != "Explain"} { lappend program2 $opcode }
}
return [expr {$program1==$program2}]
}