From 5eae84bb751d46c3146eac109489477642c6cd0a Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 7 Mar 2023 21:01:54 -0600 Subject: [PATCH] Fix memory-intensive getCPFPUnindexedBlocks mysql query --- backend/src/repositories/BlocksRepository.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/repositories/BlocksRepository.ts b/backend/src/repositories/BlocksRepository.ts index 80df1ac92..f2d0a283e 100644 --- a/backend/src/repositories/BlocksRepository.ts +++ b/backend/src/repositories/BlocksRepository.ts @@ -748,6 +748,7 @@ class BlocksRepository { SELECT height FROM compact_cpfp_clusters WHERE height <= ? AND height >= ? + GROUP BY height ORDER BY height DESC; `, [currentBlockHeight, minHeight]);