Skip to content

Commit 9b9853c

Browse files
committed
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.
1 parent 8e0a6f5 commit 9b9853c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pages/ethereum/data-availability/custody/IndexPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ export function IndexPage(): JSX.Element {
671671
let contextLabel: string;
672672
switch (currentLevel.type) {
673673
case 'window':
674-
contextLabel = `Last ${WINDOW_DAYS} Days (UTC)`;
674+
contextLabel = `Last 12 Hours (UTC)`;
675675
break;
676676
case 'day': {
677677
const labelDate = new Date(currentLevel.date + 'T00:00:00Z');
@@ -722,9 +722,9 @@ export function IndexPage(): JSX.Element {
722722

723723
switch (currentLevel.type) {
724724
case 'window': {
725-
// Full 19-day window
725+
// Last 12 hours (not full window - too expensive to query)
726726
timeRange = {
727-
timeStart: now - WINDOW_DAYS * SECONDS_PER_DAY,
727+
timeStart: now - 12 * SECONDS_PER_HOUR,
728728
timeEnd: now,
729729
};
730730
break;

0 commit comments

Comments
 (0)