From 92d745168c58ac626fd3b7cdda4ba742e6583c50 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Mon, 13 Dec 2021 14:31:34 +0900 Subject: [PATCH] Doubled the data points for 1W and 3Y to improve resolution --- backend/src/api/statistics.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/api/statistics.ts b/backend/src/api/statistics.ts index fcd28d40e..2613ca676 100644 --- a/backend/src/api/statistics.ts +++ b/backend/src/api/statistics.ts @@ -407,7 +407,7 @@ class Statistics { public async $list1W(): Promise { try { const connection = await DB.pool.getConnection(); - const query = this.getQueryForDaysAvg(1200, '1 WEEK'); // 20m interval + const query = this.getQueryForDaysAvg(600, '1 WEEK'); // 10m interval const [rows] = await connection.query({ sql: query, timeout: this.queryTimeout }); connection.release(); return this.mapStatisticToOptimizedStatistic(rows); @@ -485,7 +485,7 @@ class Statistics { public async $list3Y(): Promise { try { const connection = await DB.pool.getConnection(); - const query = this.getQueryForDays(172800, "3 YEAR"); // 2d interval + const query = this.getQueryForDays(86400, "3 YEAR"); // 1d interval const [rows] = await connection.query({ sql: query, timeout: this.queryTimeout }); connection.release(); return this.mapStatisticToOptimizedStatistic(rows);