记录
录制功能可帮助开发者调试查询集并将其隔离到不同的会话中,称为录制。这种有针对性的方法可以防止来自不同应用或测试轮次的查询混合,从而实现精确的性能分析和优化,从而获得更清晰的洞察和更有效的调试。
¥The recordings feature helps developers debug and isolate sets of queries into distinct sessions, known as recordings. This targeted approach enables precise performance analysis and optimization by preventing the mixing of queries from different applications or test rounds, leading to clearer insights and more effective debugging.
管理录制会话
¥Managing a recording session
你可以通过点击“开始录制”和“停止录制”按钮,手动通过 启动和停止录制会话。
¥You can manually start and stop recording sessions via the by clicking the Start Recording and Stop Recording buttons.
如果达到 10k 查询限制或应用的 Prisma 架构发生更改,录制将自动停止。
¥A recording will automatically stop if the 10k query limit is reached or if the Prisma schema of the app is changed.
识别录制会话
¥Identifying a recording session
你可以重命名和标记你的录制会话,以便于识别和了解上下文。点击会话的默认名称并输入所需的名称。
¥You can rename and tag your recording sessions for easy identification and context. Click on the default name of the session and type the desired name.
录制会话中捕获的数据
¥Data captured in a recording session
每个记录会话都会捕获有关你应用中执行的查询的详细信息,包括:
¥Each recording session captures detailed insights about the queries executed in your app, including:
-
会话期间执行的所有查询。
¥All queries executed during the session.
-
Prisma ORM 生成并发送到数据库的原始查询,称为“原始查询”。
¥The raw query generated and sent to the database by Prisma ORM as Raw Query.
-
查询模式的执行次数,以“计数”形式列出。
¥The number of times a query pattern was executed, listed as Count.
-
查询执行期间遇到的错误。
¥Errors encountered during query execution.
每条记录最多可包含 10,000 条查询。存储保留没有限制。
¥Each recording can include up to 10k queries. There are no limits on storage retention.
来自录制的建议会话
¥Recommendations from a recording session
记录会话结束时,Optimize 会生成如下建议:
¥When a recording session ends, Optimize generates recommendations such as:
了解更多关于 Optimize 此处 生成的建议。
¥Learn more about the recommendations generated by Optimize here.