Windshaft-cartodb/lib/cartodb/models/dataview
Rafa de la Torre 065f56e161 Improve the speed of the aggregation dataview
Improve the performance of the aggregation dataview.

Instead of using a CTE (WITH) for filtered_source, which is only used in
one place to calculate ranks, inject it as a subquery.

This way the planner has a chance to ignore uneeded columns as well as
to parallelize the exectution of the window function (WindowAgg in the
query plan).

That is the part that takes most of the time of the query.

The improvement is about 20-40% in speed on PG10 with 4 cores.
2018-02-07 18:10:13 +01:00
..
histograms Numeric histograms: Avoid conflicts with 'bin' named columns 2017-12-22 17:12:57 +01:00
overviews Optimize formulae queries 2017-12-11 11:27:13 +01:00
aggregation.js Improve the speed of the aggregation dataview 2018-02-07 18:10:13 +01:00
base.js fix 'this' scope with arrow function 2017-10-04 11:10:17 +02:00
factory.js Use destructuring assignment to improve readability 2017-09-15 14:07:46 +02:00
formula.js Optimize formulae queries 2017-12-11 11:27:13 +01:00
histogram.js Use hasOwnProperty method to check if histogram is a time-series 2017-09-12 10:38:53 +02:00
index.js Removes list dataview type 2017-09-28 10:47:44 +00:00