When working with entities that have datetimes, partition the SQL table ahead of time to avoid headaches in the future.
- Partitioning enables faster lookup and faster dropping of old data.
- Prisma ORM does not allow adding a date field to the primary key: https://github.com/prisma/prisma/issues/17244
- Workaround: generate day-of-year as a separate column.
Top comments (0)