Skip to main content
idapt
HomeCodeAI ModelsPricing
Sign inStart free
  • Home
  • Pricing
  • AI Models
  • Image models
  • Voice models
  • Video models
  • Rankings
  • New models
  • Model status
  • Multi-Model Chat
  • Voice Mode
  • Voice HUD
  • Web Search
  • Image Generation
  • Video Generation
  • Audio Generation
  • Transcription
  • Drive
  • Credentials
  • Sharing
  • Workspaces
  • Tasks
  • Memory
  • Agents
  • Subagents
  • Automations
  • Skills
  • idapt Code
  • Code Execution
  • Computers
  • Computer Use
  • Computer Assist · Soon
  • Containers
  • Cloud Computers
  • Local AI
  • AI Gateway
  • API & SDK
  • CLI
  • MCP
  • Tunnels
  • All features →
  • LLM cost calculator
  • Token counter
  • Context window checker
  • Can I run it
  • Model picker quiz
  • Savings finder
  • Video cost estimator
  • Text to speech cost
  • Transcription cost
  • API endpoint tester
  • All free tools →
  • Blog
  • Use cases
  • Comparisons
  • Best of
  • Skills
  • Learn
  • Changelog
  • Help center
  • FAQ
  • Privacy
  • Compare all models
  • Support
  • idapt Code
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Downloads
  • Desktop
  • Badges and embeds
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)
All skills
Code

Tune a slow query

Read the plan, find the real cost, and prove the fix with numbers.

Fill it in

Paste it, with the schema if you have it.

If you already have one.

Same data, same conditions.

Your prompt

Tune this query.

[the query]

Existing plan:
[your explain output]
Run EXPLAIN ANALYZE and read the actual rows against the estimated rows. That gap
is where nearly every slow query lives: the planner chose a nested loop expecting
12 rows and got 400,000, and no amount of index guessing fixes a bad estimate.

Find the one node that dominates the time before changing anything. Optimising a
step that costs 3% of the runtime is the most common wasted afternoon in this
work.

Measure before and after on the SAME data with a warm cache both times. A
comparison against a cold run is how a query that got slower gets shipped as a
fix.
Say what the index costs on write, and whether the query should exist at all.
Use Tune a slow queryOpens with everything above already filled in.

Why this works

Nearly every slow query is a bad row estimate: the planner expected 12 rows and got 400,000, and no amount of index guessing fixes that. This reads actual against estimated, finds the node that dominates, and measures both runs warm.

More code skills

  • idapt Code
  • Fix a failing test

Use it now in a chat in 1 click

Use Tune a slow query
Fix a GitHub issue
  • Find security bugs
  • Ship a feature
  • Speed up slow code