Query Bloat

I cannot find anything anywhere about how to query a database efficiently. By that I mean if I have a json object with a bunch of id fields, all query snaps (JDBC in my case) seem to query for each item in the object and I cannot find anything on how I would turn that into a single array that is passed into a query.

This seems like a very simple thing and is far more efficient, yet I can’t find any mention of it anywhere.

Anyone resolved this?