Check for the empty seq case before .in_(seq) queries; results in an expensive sequential scan otherwise.
Check for the empty seq case before .in_(seq) queries; results in an expensive
sequential scan otherwise.

jobscore/sync-engine,closeio/nylas,EthanBlackburn/sync-engine,EthanBlackburn/sync-engine,Eagles2F/sync-engine,wakermahmud/sync-engine,wakermahmud/sync-engine,gale320/sync-engine,gale320/sync-engine,gale320/sync-engine,jobscore/sync-engine,gale320/sync-engine,jobscore/sync-engine,wakermahmud/sync-engine,ErinCall/sync-engine,nylas/sync-engine,closeio/nylas,Eagles2F/sync-engine,ErinCall/sync-engine,nylas/sync-engine,jobscore/sync-engine,Eagles2F/sync-engine,gale320/sync-engine,PriviPK/privipk-sync-engine,PriviPK/privipk-sync-engine,Eagles2F/sync-engine,ErinCall/sync-engine,EthanBlackburn/sync-engine,EthanBlackburn/sync-engine,nylas/sync-engine,ErinCall/sync-engine,PriviPK/privipk-sync-engine,nylas/sync-engine,wakermahmud/sync-engine,ErinCall/sync-engine,closeio/nylas,wakermahmud/sync-engine,PriviPK/privipk-sync-engine,EthanBlackburn/sync-engine,closeio/nylas,PriviPK/privipk-sync-engine,Eagles2F/sync-engine