数据库
了解 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 提供内置的 连接池,无需任何配置。高效的数据库连接管理使数据库能够处理更多查询,而不会耗尽可用的数据库连接,从而使你的应用更具可扩展性。
备份
概述
Postgres 扩展
概述
本地开发
Prisma Postgres 是生产级云原生数据库,非常适合暂存和生产环境。为了快速迭代和独立测试,你可以通过 prisma dev 命令运行本地 Prisma Postgres 实例(由 PGlite 提供支持)。本页介绍如何安装和启动本地 Prisma Postgres 数据库。
直接连接
概述
Prisma 工作室
无服务器驱动程序
Prisma Postgres 无服务器驱动程序 (@prisma/ppg) 是一个轻量级客户端,用于使用原始 SQL 连接到 Prisma Postgres。使用的协议是 HTTP 和 WebSocket,而非传统的 TCP 连接,这使得在原生 PostgreSQL 驱动程序无法运行的受限环境中也能访问数据库。