From 9b9853c1c5e037146924cb1d0e17da1f9d3291fc Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Mon, 15 Dec 2025 12:15:06 +1000 Subject: [PATCH] perf(custody-probes): limit column header query to 12 hours When clicking a column header at window level, limit probe query to last 12 hours instead of the full 19-day window. The full window was causing scans of 27M+ rows in ClickHouse. --- src/pages/ethereum/data-availability/custody/IndexPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/ethereum/data-availability/custody/IndexPage.tsx b/src/pages/ethereum/data-availability/custody/IndexPage.tsx index aa3cda69a..37dbbad5c 100644 --- a/src/pages/ethereum/data-availability/custody/IndexPage.tsx +++ b/src/pages/ethereum/data-availability/custody/IndexPage.tsx @@ -671,7 +671,7 @@ export function IndexPage(): JSX.Element { let contextLabel: string; switch (currentLevel.type) { case 'window': - contextLabel = `Last ${WINDOW_DAYS} Days (UTC)`; + contextLabel = `Last 12 Hours (UTC)`; break; case 'day': { const labelDate = new Date(currentLevel.date + 'T00:00:00Z'); @@ -722,9 +722,9 @@ export function IndexPage(): JSX.Element { switch (currentLevel.type) { case 'window': { - // Full 19-day window + // Last 12 hours (not full window - too expensive to query) timeRange = { - timeStart: now - WINDOW_DAYS * SECONDS_PER_DAY, + timeStart: now - 12 * SECONDS_PER_HOUR, timeEnd: now, }; break;