Skip to main content

Prisma Optimize 的已知限制

以下是使用 Prisma Optimize 时已知限制的描述。如果你发现任何缺失的限制,请通过我们社区 Discord 中的 #help-and-questions 通道告知我们。

¥Below are the known limitations when using Prisma Optimize. If you are aware of any limitations that are missing, please let us know on the #help-and-questions channel in our community Discord.

录制会话的查询限制

¥Query limit on a recording session

每个 录制会话 最多可包含 10,000 条查询。达到此限制后,录制会话将结束。

¥Each recording session can contain a maximum of 10,000 queries. Once this limit is reached, the recording session will end.

每个工作区的记录限制

¥Recording limit per workspace

每个 workspace 最多可包含 100 条 recordings

¥Each workspace can contain a maximum of 100 recordings.

Prisma AI 的范围和约束

¥Scope and constraints for the Prisma AI

虽然 Prisma AI 可以为实现 recommendation 提供有益的指导,但仍需牢记一些重要的限制:

¥While Prisma AI can provide helpful guidance to implement a recommendation, there are some important limitations to keep in mind:

  • 信息和准确性:AI 基于广泛的通用知识库提供建议,并且无法直接访问 Prisma ORM 文档。这有时可能会导致信息不准确或过时。

    ¥Information and accuracy: The AI provides advice based on a broad, general knowledge base and does not have direct access to Prisma ORM documentation. This may occasionally result in inaccuracies or outdated information.

  • 有限的上下文和适配:AI 不会保留对话或从之前的交互中学习。它的响应是通用的,可能无法始终满足高级用户的特定需求。

    ¥Limited context and adaptation: The AI does not persist conversations or learn from previous interactions. Its responses are generalized and may not always address the specific needs of advanced users.

  • 静态知识和范围:AI 的知识是静态的,可能不包含特定日期之后的最新更新或最佳实践。它仅在 Prisma ORM 上下文中提供建议,无法修改或执行代码,也无法直接与用户环境交互。

    ¥Static knowledge and scope: The AI's knowledge is static and may not include recent updates or best practices after a certain date. It provides advice only within the context of Prisma ORM and cannot modify or execute code, nor interact directly with user environments.

将 Prisma Accelerate 客户端扩展与 Optimize 扩展结合使用

¥Using Prisma Accelerate client extension with the Optimize extension

优化客户端扩展加速客户端扩展 一起使用时,请确保将 Accelerate 客户端扩展最后添加到扩展的 PrismaClient 中。这允许 Optimize 接收可缓存的操作。

¥When using the Optimize client extension with the Accelerate client extension, ensure the Accelerate client extension is added last to your extended PrismaClient. This allows cacheable operations to be received by Optimize.

const prisma = new PrismaClient()
.$extends(
withOptimize({
apiKey: process.env.OPTIMIZE_API_KEY,
}),
)
.$extends(withAccelerate());

MongoDB 建议中的 SQL 引用

¥SQL references in MongoDB recommendations

Prisma Optimize 为 MongoDB 用户提供了实用的建议,尽管 Prisma AI 中的一些解释可能涉及 SQL 特定的概念。但是,recommendations 仍然有用,并且适用于 MongoDB 环境。

¥Prisma Optimize provides helpful recommendations for MongoDB users, though some explanations from Prisma AI may reference SQL-specific concepts. However, the recommendations remain useful and applicable to MongoDB environments.

MongoDB 中的原始查询可见性

¥Raw query visibility in MongoDB

原始查询在 MongoDB 中可见,但传递给它们的参数不会显示。

¥Raw queries are visible in MongoDB, though the parameters passed to them are not displayed.

驱动程序适配器兼容性

¥Driver adapter compatibility

Prisma Optimize 尚不兼容 驱动适配器。但是,作为一种解决方法,你可以使用常规 Prisma Client 和 Prisma Optimize 在本地运行查询,以检查和提高查询性能。

¥Prisma Optimize is not yet compatible with driver adapters. However, as a workaround, you can run your queries locally using the regular Prisma Client along with Prisma Optimize to inspect and improve query performance.