Home / Function/ IndexImprovementText() — supabase Function Reference

IndexImprovementText() — supabase Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  77095809_f5e0_ebf9_c944_46137d134758["IndexImprovementText()"]
  5ee88df4_951c_0803_af49_b513717887c7["calculateImprovement()"]
  77095809_f5e0_ebf9_c944_46137d134758 -->|calls| 5ee88df4_951c_0803_af49_b513717887c7
  style 77095809_f5e0_ebf9_c944_46137d134758 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/QueryPerformance/IndexAdvisor/IndexImprovementText.tsx lines 12–28

export const IndexImprovementText = ({
  indexStatements,
  totalCostBefore,
  totalCostAfter,
  className,
  ...props
}: IndexImprovementTextProps) => {
  const improvement = calculateImprovement(totalCostBefore, totalCostAfter)

  return (
    <p className={cn('text-sm text-foreground-light mb-3', className)} {...props}>
      Query's performance can be improved by{' '}
      <span className="text-brand">{improvement.toFixed(2)}%</span> by creating this{' '}
      {indexStatements.length > 1 ? 'indexes' : 'index'}:
    </p>
  )
}

Subdomains

Frequently Asked Questions

What does IndexImprovementText() do?
IndexImprovementText() is a function in the supabase codebase.
What does IndexImprovementText() call?
IndexImprovementText() calls 1 function(s): calculateImprovement.

Analyze Your Own Codebase

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

Try Supermodel Free