-
-
Notifications
You must be signed in to change notification settings - Fork 466
Closed
Labels
performanceFix or optimization of performanceFix or optimization of performancequestionRequest for support or clarificationRequest for support or clarification
Description
I have a attribute defined on a model like this:
type Table1 {
agentViewedCount(pk: String @eq, agent_viewed: Boolean @eq): Int @count(relation: "rel_name")
}this generates a query like this:
select "uuid",
(select count(*) from "rel_table" where "table1"."uuid" = "rel_table"."table1_id" and "pk" = 'key' and "agent_viewed" = 0) as "rel_name_count"
from "table1"`Why does a select with uuid and the count? I just want the count int value.
Just the second select should be enough.
Like this it takes a loong time, it's not efficient and cant not be used.
Metadata
Metadata
Assignees
Labels
performanceFix or optimization of performanceFix or optimization of performancequestionRequest for support or clarificationRequest for support or clarification