prorm API Reference
    Preparing search index...

    Function buildAnalyzeSQL

    • Refresh the planner's statistics for a table.

      The one maintenance operation worth running routinely: a planner working from stale statistics chooses bad plans, and that is the usual cause of a query that was fast last month.

      Parameters

      • table: string | undefined
      • dialect: string
      • quoteTable: (t: string) => string
      • quoteId: (id: string) => string
      • options: AnalyzeOptions = {}

      Returns string