From: Johan De Meersman Date: February 9 2012 1:53pm Subject: Re: C api mysql_store_result vs mysql_use_result List-Archive: http://lists.mysql.com/mysql/226766 Message-Id: <470c9c95-f887-43c0-b279-02d12657b618@zimbra> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit ----- Original Message ----- > From: "Alex Schaft" > > From the user's perspective, they just need to know the process didn't > hang. The count() query is more for getting memory requirements upfront. > Can I handle it all, or do I need to break it down into pages? Then just use the cursor-based api (I guess that's mysql_use_result) all the time, and you won't have any memory problems at all. If you need to retrieve pages (as in, the third block of 10 results, for instance) LIMIT is your friend. Do read the documentation on limit, though - there's performance caveats when you use order by and similar. -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel