get queries from a sharded DB and msgpack files