Gigantic 6MB lfs_object queries on GitLab.com take 1500ms to parse
Reviewing the GitLab.com postgres primary, we have some queries with the form:
SELECT 1 AS one FROM \""lfs_objects\"" WHERE \""lfs_objects\"".\""oid\"" IN ('6d8237a5a3e2a22f60f0dd8dce....', '7cb45fb051f3da62....', '5d7eeb38d27a44....
This is followed by 6MB of object ids.
These queries take 1.5s to parse before they are even being executed.
I'm not aware of whether or not this is leading directly to performance impacts, but this should be investigated further.
We should also investigate whether there is a better way of processing this query.