...
Code Block | ||
---|---|---|
| ||
SELECT * FROM fragment WHERE anchor_id = ? AND xpath IN (?,?,?,?,?,?...,?) SELECT * FROM fragment WHERE anchor_id = ? AND xpath IN (?,?,?,?,?,?...,?) SELECT * FROM fragment WHERE anchor_id = ? AND xpath IN (?,?,?,?) |
Observations
Disadvantage: public API signatures may need to be changed
If a public method takes in a Collection (and not a List), then either an ArrayList copy of the Collection is needed, or the public API method needs to be changes to List, as Lists.partition requires a List to partition.
Proposal #2: Postgres arrays
...
It is unclear if this has better performance in practice (limited testing shows both solutions have similar performance, but the test scenarios may be unrealistic).
Observations
Disadvantage of arrays: Limited array type support
...