Hi, I have the following database query in my backend code:
const data = await CLIENT_INSTANCE.someTable.findMany({
select: {
col1: true,
col2: true
},
where: {
table2: {
table3: {
id: myTable3Elt.id,
col5: true
}
}
}
});
It includes 2 joins and I expect up to 1M results, so I'm fine with a runtime of .5s or so. The database query itself executes in around 300ms -- both according to the database logs and the prisma logging, but the entire TS line executes for 2 seconds. Does anyone know why that might be? Is it normal to expect such a large overhead when a large number of rows is involved?