Going further

Read this page in the documentation

Going further Everything here is reference material. Unlike Core concepts, it is not meant to be read front to back — each group answers a question you will eventually have, and is best read when you actually have it. Performance Reach for these when something is slow, or before it is. Page | Read it when | --- | --- | Query optimization | A query is slow and you need to see the plan, add hints, or batch work. | Caching | The same read happens repeatedly and the data changes rarely. | Connection pooling | You are running out of connections, or holding them too long. | Streams | A result set does not fit in memory — exports, backfills, migrations. | Replication | Reads should go to a replica and writes to the primary. | Schema Working with the shape of the database rather than its contents. Page | Read it when | --- | --- | Views, triggers & other schema objects | You need views, materialized views, sequences, triggers, procedures, row-level security or partitions. | SQL features | You need generated or identity columns, exclusion constraints, index hints, sampling, cursors or table storage settings. | Schema diffing | You want to know how the live schema differs from your models. | Multiple databases | One application talks to more than one database. | Query interface | You need DDL directly, outside a migration. | Types and extensibility Page | Read it when | --- | --- | TypeScript types | You want inference to follow your models properly. | Decorators | You prefer class syntax to define(). | Virtual fields | An attribute is computed rather than stored. | External fields | An attribute lives outside this table. | SQL functions | You need fn(), col() and literal() in a query. | SQL constants | You need session settings: isolation, pragmas, sqlmode. | Extensions | You want to add behaviour to the ORM itself. | Foreign data wrappers | A table lives in another database entirely. | Graph databases | You are querying a property graph rather than tables. | SQLite advanced | You want FTS5, window functions, ATTACH or pragma tuning. | Operating The concerns that show up once something is running in production. Page | Read it when | --- | --- | Logging | You need to see the SQL, or route it somewhere. | Audit logging | You need a durable record of who changed what. | Error handling | You need to tell a constraint violation from a connection failure. | Compliance | You have GDPR, retention, encryption or firewall requirements. | User management | You are creating roles and granting privileges from code. | Tooling Page | Read it when | --- | --- | CLI | You want scaffolding, model generation or migration commands. | Prisma import | You are migrating from a Prisma schema. | Diagrams | You want ER, class or migration diagrams generated from your models. | Test gaps | You are contributing and want to know what is deliberately untested. | Related reading Core concepts — read those first SQL dialects — per-engine behaviour Data stores — the non-SQL adapters