Add two chunked select queries (for keys and entities)