in MySQL this works fine. (having tested with 22k devices). no issues.
this is a bug, only present on Postgres.