Skip to content
Snippets Groups Projects
Commit 11d2b8b5 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- inner ORDER BY is not needed and results in larger execution times

parent 5ae8ed09
Branches
No related tags found
No related merge requests found
......@@ -8,11 +8,9 @@ SELECT ie_id,lza_id,version,dir_path FROM aip where lza_id in (
SELECT ie_id, lza_id, COUNT(*) as versionen
FROM aip
GROUP BY ie_id, lza_id
ORDER BY ie_id DESC
)
GROUP BY lza_id
HAVING anzahl_ie_pids > 1
ORDER BY anzahl_ie_pids DESC
)
) ORDER BY lza_id
SQL1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment