Commit afc14e0f authored by Jérome Perrin's avatar Jérome Perrin

implicit predecessor: rewrite this slow subquery in a join

parent c52bfb1b
......@@ -64,8 +64,8 @@ SELECT path, uid\n
FROM\n
(\n
SELECT DISTINCT\n
path,\n
(select uid from catalog where catalog.path=sub.path) as uid\n
sub.path,\n
uid\n
FROM\n
( SELECT\n
@current_path:=IF(@current_reference = reference, @current_path, path) AS path,\n
......@@ -92,7 +92,7 @@ FROM\n
ORDER BY reference, language_order DESC, version DESC, revision DESC\n
) AS innersub\n
)\n
AS sub\n
AS sub inner join catalog on catalog.path = sub.path\n
)\n
AS main\n
WHERE\n
......@@ -101,6 +101,7 @@ LIMIT 1000\n
\n
</dtml-let>\n
</dtml-let>\n
\n
]]></string> </value>
......
1272
\ No newline at end of file
1273
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment