we have queries like (see the database that we handed over to you for other issues)
select distinct o from ObjectNode o join o.properties p1 join o.properties p2 where o.classIdentifier = "(OP)" and (o.linkedObjects.classIdentifier = "(TC)" and o.linkedObjects.objectNameUpper = "MILLING-EL" and o.linkedObjects.type =1) and (o.properties.name = "feedbackState" and o.properties.doubleValue != 13) and ((p1.name = "plannedState" and p1.doubleValue = 4 and p1.state = 4) or ((p1.name = "startableState" and p1.doubleValue = 0) and (p2.name = "plannedState" and p2.doubleValue = 4)))
that normally take around 10 seconds but sometimes several times a day take around 3-10 minutes. Our system has a load of around 400 concurrent webSocket connections that normally only query (without updates, like the above example)