jtv found that using a temporary table with an index in lieu et place of the CTE improves things quite significantly: https://pastebin.canonical.com/55838/. The temp tables takes ~1s to setup and the main query now takes ~200ms (https://pastebin.canonical.com/55836/).
This is pretty amazing but it means that we would have to use the master store to be able to create the temporary table.
jtv found that using a temporary table with an index in lieu et place of the CTE improves things quite significantly: /pastebin. canonical. com/55838/. The temp tables takes ~1s to setup and the main query now takes ~200ms (https:/ /pastebin. canonical. com/55836/).
https:/
This is pretty amazing but it means that we would have to use the master store to be able to create the temporary table.