Relative Content

Tag Archive for postgresqlprisma

Avoid large intermediate results for conditions on relationships

We use Prisma to access a Postgres database. The query below runs very slowly. A simple modification to the SQL (also shown below) makes it orders of magnitude faster. Is there a way to tell Prisma to use the modified version. I’d like to avoid the slowdown, preferably without resorting to raw SQL.

Is there a way to use prisma and do a live migration without data loss

Is there a way to use Prisma ORM to do a database migration (either when adding a new column, adding a new constraint etc.) in production without data loss. I know that when you apply a new column change, that that will break SQL’s constraints since the column will be required.

Find distinct values in field of array of strings using Prisma

I am new to Prisma. I have a Postgres data set where the entries include a field named genres that is an array of strings. I want to call to the database using prisma and return an array of distinct genres. What I want to avoid is treating an array of genres as a distinct value. Example below.