From: Warren Young Date: March 23 2011 11:59am Subject: Re: StoreQueryResults destructor runs without end... List-Archive: http://lists.mysql.com/plusplus/9270 Message-Id: <4D89E093.60505@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 3/23/2011 4:07 AM, Tomalak Geret'kal wrote: > > It's not necessarily strictly doubled. Name an implementation of std::vector that doesn't do this. > I don't see why you'd ever reserve *more* than the number of records In this case, you'd do that to avoid the need for a separate COUNT(*) query. If you have a pretty good idea already how many records to expect, reserving that amount plus some small fudge factor will probably run faster than doing two queries so you can reserve only exactly what is required.