数据库
了解 Prisma Postgres 如何实现基础数据库功能,例如内置缓存、连接池、备份和安全访问。这些功能由 Prisma Postgres 基础架构提供支持,旨在优化应用性能和可靠性。
¥Learn how Prisma Postgres implements foundational database features such as built-in caching, connection pooling, backups, and secure access. These features are powered by Prisma Postgres infrastructure and designed to optimize application performance and reliability.
在这个部分
¥In this section
缓存
Prisma Postgres 支持内置查询缓存,以减少数据库负载并提升查询性能。你可以使用所有读取查询中可用的 cacheStrategy 选项配置缓存行为。
连接池
Prisma Postgres 默认提供内置 连接池,由 Prisma 加速 启用。通过使用 Prisma Postgres,你可以享受连接池的优势,而无需进行任何配置。高效的数据库连接管理使数据库能够处理更多查询,而不会耗尽可用的数据库连接,从而使你的应用更具可扩展性。
备份
概述
Postgres 扩展
概述
本地开发
Prisma Postgres 是生产级云原生数据库,非常适合暂存和生产环境。为了快速迭代和独立测试,你可以通过 prisma dev 命令运行本地 Prisma Postgres 实例(由 PGlite 提供支持)。本页介绍如何安装和启动本地 Prisma Postgres 数据库。
直接连接
概述
Prisma 工作室
无服务器驱动程序
Prisma Postgres 的无服务器驱动程序是一个轻量级且精简的客户端库,可以使用原始 SQL 与 Prisma Postgres 通信。你可以通过 @prisma/ppg npm 包使用它。