Home / Function/ QueryPerformance() — supabase Function Reference

QueryPerformance() — supabase Function Reference

Architecture documentation for the QueryPerformance() function in QueryPerformance.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/studio/components/interfaces/QueryPerformance/QueryPerformance.tsx lines 23–50

export const QueryPerformance = ({
  queryHitRate,
  queryPerformanceQuery,
  queryMetrics,
  isPgStatMonitorEnabled,
  dateRange,
  onDateRangeChange,
}: QueryPerformanceProps) => {
  const { ref } = useParams()
  const state = useDatabaseSelectorStateSnapshot()

  useEffect(() => {
    state.setSelectedDatabaseId(ref)
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [ref])

  if (isPgStatMonitorEnabled) {
    return <WithMonitor dateRange={dateRange} onDateRangeChange={onDateRangeChange} />
  }

  return (
    <WithStatements
      queryHitRate={queryHitRate}
      queryPerformanceQuery={queryPerformanceQuery}
      queryMetrics={queryMetrics}
    />
  )
}

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free