News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Derick Rethans' Blog:
MongoDB Cursors with PHP
May 22, 2012 @ 12:23:16

Derick Rethans has a new post to his site today about MongoDB cursors in PHP when using the PHP driver and how it handles pulling data from the server.

Recently I was asked to improve the MongoCursor::batchSize documentation. This began an indepth investigation in how the PHP driver for MongoDB handles pulling data that's been queried from the MongoDB server. Here are my findings.

He talks about the cursor that's created when a "find" call is made and how you can add on additional options (via other methods on the cursor) to its execution. He also covers how you can set your own batch size, using limit to only fetch a certain number of results and combining the two to make for more memory efficient, yet complete, returned data sets.

0 comments voice your opinion now!
mongodb cursor batchsize limit tutorial


blog comments powered by Disqus

Similar Posts

Dutch Web Alliance: Using Varnish with ESI for a REST API

WebReference.com: Administering RBAC in PHP 5 CMS Framework

Matthew Weier O'Phinney's Blog: Responding to Different Content Types in RESTful ZF Apps

Zend Developer Zone: Using JavaScript in PHP with PECL and SpiderMonkey

Andy Bakun's Blog: Race Conditions with Ajax and PHP Sessions


Community Events





Don't see your event here?
Let us know!


release api language community interview tips list zendserver podcast symfony framework development voicesoftheelephpant introduction code bugfix threedevsandamaybe series laravel deployment

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework