diff --git a/apps/studio/components/interfaces/QueryPerformance/QueryPerformance.constants.ts b/apps/studio/components/interfaces/QueryPerformance/QueryPerformance.constants.ts index 88bd1b0cf94..18565e4d2a5 100644 --- a/apps/studio/components/interfaces/QueryPerformance/QueryPerformance.constants.ts +++ b/apps/studio/components/interfaces/QueryPerformance/QueryPerformance.constants.ts @@ -20,7 +20,7 @@ export const QUERY_PERFORMANCE_COLUMNS = [ { id: 'max_time', name: 'Max time', description: undefined, minWidth: 100 }, { id: 'mean_time', name: 'Mean time', description: undefined, minWidth: 100 }, { id: 'min_time', name: 'Min time', description: undefined, minWidth: 100 }, - { id: 'rows_read', name: 'Rows read', description: undefined, minWidth: 100 }, + { id: 'rows_read', name: 'Rows processed', description: undefined, minWidth: 130 }, { id: 'cache_hit_rate', name: 'Cache hit rate', description: undefined, minWidth: 130 }, { id: 'rolname', name: 'Role', description: undefined, minWidth: 160 }, ] as const diff --git a/apps/studio/components/interfaces/QueryPerformance/QueryPerformanceGrid.tsx b/apps/studio/components/interfaces/QueryPerformance/QueryPerformanceGrid.tsx index e77aa1aaf62..001b8cbba4e 100644 --- a/apps/studio/components/interfaces/QueryPerformance/QueryPerformanceGrid.tsx +++ b/apps/studio/components/interfaces/QueryPerformance/QueryPerformanceGrid.tsx @@ -168,7 +168,7 @@ export const QueryPerformanceGrid = ({ queryPerformanceQuery }: QueryPerformance const formattedValue = !!value && typeof value === 'number' && !isNaN(value) && isFinite(value) ? isTime - ? `${value.toFixed(0)}ms` + ? `${value.toFixed(0).toLocaleString()}ms` : value.toLocaleString() : '' @@ -179,7 +179,11 @@ export const QueryPerformanceGrid = ({ queryPerformanceQuery }: QueryPerformance

- {(value / 1000).toFixed(2) + 's'} + {(value / 1000).toLocaleString(undefined, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + })} + s

) : (

@@ -207,7 +211,7 @@ export const QueryPerformanceGrid = ({ queryPerformanceQuery }: QueryPerformance
{typeof value === 'number' && !isNaN(value) && isFinite(value) ? (

- {value.toFixed(0)}ms + {Math.round(value).toLocaleString()}ms

) : (

@@ -244,7 +248,11 @@ export const QueryPerformanceGrid = ({ queryPerformanceQuery }: QueryPerformance cacheHitRateToNumber(value).toFixed(2) === '0.00' && 'text-foreground-lighter' )} > - {cacheHitRateToNumber(value).toFixed(2)}% + {cacheHitRateToNumber(value).toLocaleString(undefined, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + })} + %

) : (