With this custom check on select:
{
"_or": [
{
"user": {
"id": {
"_eq": "X-Hasura-User-Id"
}
}
},
{
"feed_item_access": {
"community_allowed_view": {
"_eq": true
}
}
}
]
}
The query takes 8 seconds, however if I remove either of the two checks in the OR the query goes down to 1 second.
it doesn't seem to matter what the conditional checks are, with one it's great as soon as there's two it grinds to a halt.
Worth noting this is only excrutiatingly slow when there is an authorisation header, but it doesn't seem to be related to that even if the permission check isn't looking for x-hasura-user-id it can be slow. For admin queries it's completely fine.
It seems to mostly happen when the permissions have to look at a related table and there's two of those permissions, even if they are looking in the same table:
{
"_or": [
{
"feed_item_access": {
"community_allowed_view": {
"_eq": true
}
}
},
{
"feed_item_access": {
"clinicians_allowed_view": {
"_eq": true
}
}
}
]
}
The above takes over 5 seconds to process, if I remove either of the conditions it drops below 1 second.
I should also add on my local docker build it's fine, the issue only presents itself on the hasura hosted environment.
Any ideas what I could be missing here?
