此内容没有您所选择的语言版本。
10.5.3. Iterating Results
Occasionally, you might be able to achieve better performance by executing the query using the
iterate() method. This will usually be the case if you expect that the actual entity instances returned by the query will already be in the session or second-level cache. If they are not already cached, iterate() will be slower than list() and might require many database hits for a simple query, usually 1 for the initial select which only returns identifiers, and n additional selects to initialize the actual instances.