From 423ecb10712425d131c04b5d2c60ed2835540ba7 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 19 Aug 2021 13:47:28 +0545 Subject: [PATCH] update stats table indexes --- app/config/collections2.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/config/collections2.php b/app/config/collections2.php index 2b2419204e..0ed14dc369 100644 --- a/app/config/collections2.php +++ b/app/config/collections2.php @@ -1473,9 +1473,16 @@ $collections = [ 'orders' => [Database::ORDER_DESC], ], [ - '$id' => '_key_time_period', + '$id' => '_key_metric', 'type' => Database::INDEX_KEY, - 'attributes' => ['time', 'period'], + 'attributes' => ['metric'], + 'lengths' => [], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => '_key_metric_period', + 'type' => Database::INDEX_KEY, + 'attributes' => ['metric', 'period'], 'lengths' => [], 'orders' => [Database::ORDER_DESC], ],