Remove redundant SQL condition (#6573)

In this condition you already have  p.dialplay_uuid = s.dialplay_uuid  and you have p.dialplay_uuid = CONST, no need tor s.dialplay_uuid=CONST,

In small databases, this could be trivial; but in significant databases, this saves a lot of processing.
This commit is contained in:
Luis Daniel Lucio Quiroz
2023-03-09 16:13:50 -05:00
committed by GitHub
parent 801c19da80
commit c4422e65f8

View File

@@ -662,7 +662,6 @@
}
if (is_uuid($this->uuid)) {
$sql .= "and p.dialplan_uuid = :dialplan_uuid \n";
$sql .= "and s.dialplan_uuid = :dialplan_uuid \n";
$parameters['dialplan_uuid'] = $this->uuid;
}
$sql .= "and (s.dialplan_detail_enabled = 'true' or s.dialplan_detail_enabled is null) \n";