You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case there are many service instances related db queries
might become very complex:
```
SELECT * FROM \"services\" WHERE ((\"services\".\"id\" IN (7)) AND (\"id\" IN (<super long list of service ids>)))
```
This can lead to high memory consumption on the api VMs and can also cause memory bloats as everything is loaded into memory.
With this change we change the query to use a sub query instead:
```
SELECT * FROM \"services\" WHERE ((\"services\".\"id\" IN (7)) AND (\"id\" IN (SELECT DISTINCT \"service_id\" FROM \"service_plans\")))
```
Co-authored-by: Philipp Thun <[email protected]>
0 commit comments