Project: datamanagement
Issue DM-5145: Avoid merge table (i.e. result_m) creation on czar side
When launching a query which require an aggregation/merge, Qserv first creates a result_m table to collect chunk query results and then a result table. On the other hand, for a query which doesn't require a merge, only result table is created. If merge query was send to mysql-proxy right after query parsing (like it is currently done with "order by" clause only, this would be then generalized to all merge queries), creation of result_m table could be avoided. This would lead to simpler C++ code, and aggregation would be performed at the same time that returning result, which may lead to better performance. Queries wich requires or not aggregation step would be processed exactly the same way on the C++ side (store results of chunk queries), and mysql-proxy would release lock on result table when running aggregation/merge query (here, one can consider that simply concatening results of query would also be a kind of aggregation). Please not that removal of result_m table would also free some space on master, which is a bottleneck. [~jbecla], I propose you to plan this interesting feature for next sprint, feel free to postpone it. I think that intersection with "Query coverage" story might not be empty.
Story points: 10