GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||
GeezerVison is showing www.prisma.io — Query Insights with Prisma Postgres Query InsightsIntroduction Query InsightsInspect slow queries, connect Prisma calls to SQL, and apply focused fixes with Prisma Postgres. Query Insights is built into Prisma Postgres and helps you understand which queries are slow, why they are expensive, and what to change next. It does not automatically rewrite your queries or schema. Query Insights replaces Prisma Optimize and is now included with Prisma Postgres at no extra cost. You can try it today in the Prisma Console. DashboardThe main Query Insights view gives you a live summary of query activity for your database. At the top of the page, you can inspect:
This makes it easier to see whether a problem is steady, bursty, or tied to a short window of activity. Query listBelow the charts, Query Insights shows a list of grouped queries. Each row includes:
You can use the controls above the table to:
Use this view to decide which query patterns to investigate first. Query detailSelecting a query opens a detail view for that statement. The detail view shows:
The AI analysis describes the likely cause of the performance issue, the specific change it recommends, and the expected impact. The copyable prompt includes your actual query along with context, so you can paste it into your editor or a tool like Cursor, Copilot, or Claude and get a concrete code change without switching context. Treat the AI analysis as a starting point, not a final answer. Review any suggested change before shipping it. Prisma ORM attributionWhen using Prisma ORM, Query Insights can trace the full chain from your application code to the SQL it generates. This means you can see which For raw SQL or queries issued outside Prisma ORM, Query Insights still shows full SQL behavior, but ORM-level attribution requires the steps below. SetupTo enable ORM attribution, install the Then pass it to the This adds SQL comment annotations to queries so Query Insights can map SQL statements back to the Prisma calls that generated them. It is built on top of the SQL comments feature in Prisma Client. AvailabilityQuery Insights is included with Prisma Postgres at no extra cost. You can try it today in the Prisma Console. Typical issuesQuery Insights is most useful when it connects a database symptom to a concrete code change.
How to use itWhen an endpoint gets slow, Query Insights gives you a practical workflow:
In most cases, the next change falls into one of these buckets:
ExampleA common example is an N+1 pattern: Query Insights would typically show:
In this case, the likely fix is to load the related posts in one nested read: The same pattern applies to other issues. Query Insights helps you identify the expensive query shape, understand why it is expensive, and choose the next change to verify. Next steps
Edit this page on GitHub Updated | |||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |