schettn
PPrisma
•Created by schettn on 11/27/2024 in #help-and-questions
`isNot: null` filter on relation does not work
Right?
8 replies
PPrisma
•Created by schettn on 11/27/2024 in #help-and-questions
`isNot: null` filter on relation does not work
The issue is, although no routes have associated region, ‘routesData’ contains all routes.
I thought that by providing ‘isNot: null’ to the relations, it will exclude all routes that have no region. In my case all of them. So I expect an empty array.
The console log shows the relation of the first route which is null, thus this route should not be there.
8 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
The root cause is that Prisma Studio loads every record of relations into its
RecordStore
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
@Nurul I have reverse engineered the issue.
Take a look at the following code:
prisma studio used this to calculate the
select
. Normally it would use getRelationIDFieldName
to get the primary keys of the relation.
In my case i use compound primary keys like @@id([tripId, stopId, stopSequence, gtfsImportId])
.
With compound keys the getRelationIDFieldName
returns null
, it sets the relation to true
instead using only the primary keys of the relation.22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
Is it a design decision that currently all relation data is fetched, or is it a "bug"?
Because if the relations are only needed for the relation counts then a simple rewrite to this would do the trick:
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
Thanks
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
I think that prisma studio runs into memory problem when processing this large amout of data client side. So its not directly related to the response time.
I calculated the total size of the query that is performed by Prisma Studio for the GTFSImport table (with relations):
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
How is this possible? The "Fields" filter only hides the UI elements
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
Querying only the stoptimes takes about 7 seconds. But the StopTimes works well in Prisma Studio
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
Hi @Nurul I ran the query inside my service:
So its about 8 seconds. Should Prisma Studio crash in this timeframe?
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
22 replies
PPrisma
•Created by schettn on 11/26/2024 in #help-and-questions
Prisma Studio crashes with large databases
Strangly it only crashes when I open the GTFSImport model (contains only 1 row). Opening all other models works.
22 replies
PPrisma
•Created by schettn on 9/16/2024 in #help-and-questions
Lazy load query engine in Cloudflare Workers
Btw: Please add a "Other" flag to the Discord posts. I always have to add a incorrect tag in order to ask something.
3 replies
PPrisma
•Created by schettn on 7/12/2024 in #help-and-questions
How to use getDMMF
Update:
@prisma/internals seems to work. @prisma/sdk does not
6 replies
PPrisma
•Created by schettn on 7/12/2024 in #help-and-questions
How to use getDMMF
Setting the
cwd
also does not change anything.
6 replies
PPrisma
•Created by schettn on 7/12/2024 in #help-and-questions
How to use getDMMF
The query-engine exists under the following path:
packages/pylon-server/studio-pylon/node_modules/@prisma/engines/libquery_engine-darwin-arm64.dylib.node
6 replies