We have some older code that is using an old version of the couchbase client, which performs bulk operations directly by calling into the spymemcached library. In the newer releases of CB, it seems like that has all gone away, and now our wrapper lib does what appears to be the prescribed modern thing: it creates an Observable that bundles up a bunch of individual REST GETs.
This works fine for small datasets, but we have recently encountered a use case where we end up fetching documents numbering in the thousands, and the overhead of doing this is prohibitively high.
After doing some digging, I uncovered the USE KEYS element of the N1QL SELECT clause. Rudimentary experimentation suggests this is a far faster method of bulk-fetching a lot of document by key, but our CB admins have reservations about it, having not encountered it before. Can anyone speak to the performance characteristics of USE KEYS as a way of fetching large numbers of records? Any pitfalls, particularly as it pertains to clusters with several nodes?
Edit: should probably also have said, if there are better approaches to bulk fetches of documents on modern Couchbase architecture, I would appreciate a pointer in that direction.