Skip to content

Commit

Permalink
Adjusted text [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark authored May 28, 2017
1 parent f98e260 commit f7e3d98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guide/db-query-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ value which will be used as the index value for the current row.

### Batch Query <span id="batch-query"></span>

When working with large amounts of data, methods such as [[yii\db\Query::all()]] are not suitable because they require loading all data into the memory. To solve the issue Yii provides batch query support. Server holds the result data set cursor, waiting the client to get data for every iteration.
When working with large amounts of data, methods such as [[yii\db\Query::all()]] are not suitable because they require loading all data into the memory. To solve the issue Yii provides batch query support. Server holds the result data set cursor, waiting the client to get next batch of data.

> Warning: In order to use it and keep the memory requirement low in case of using MySQL, an [`Unbuffered Query`](http://php.net/manual/en/mysqlinfo.concepts.buffering.php) should be used by setting connection `PDO::MYSQL_ATTR_USE_BUFFERED_QUERY` to `false`. Unless whole data set has been retrieved, no other query could be done through the same connection. The table may remain locked by MySQL and cannot be written to by other queries. Thus, new connection should be created for this purpose.
Expand Down

0 comments on commit f7e3d98

Please sign in to comment.