From: Claudio Nanni Date: September 30 2009 3:09pm Subject: Re: disk space on arbitrary rows List-Archive: http://lists.mysql.com/mysql/218888 Message-Id: <53bcf3a60909300809h3c530f73lb7538f180d7f82f7@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=00c09ffb56b96d093f0474ccebb3 --00c09ffb56b96d093f0474ccebb3 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable A very first thing you should do is to evaluate the storage needed by a single row. This can be done by summing up all columns data types length in bytes and index lenght as well. This should be quite accurate. Just a tip to start: http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html 2009/9/30 John Dove > > > > > > > Hi! > > I need to figure out how much disk space an arbitrary number of rows in a > table take up. For example > > > SELECT DISK_SPACE(*) FROM ORDERS WHERE CREATED_AT BETWEEN x AND y > > > I know i could do something like a mysqldump with conditions and analyze > the output file but i'd like to avoid outputting anything to the filesyst= em > as it's slow. > > My underlying db type is InnoDB on Server version: 5.0.75-0ubuntu10.2 > > Any help would be much appreciated. > > -John > > _________________________________________________________________ > Hotmail=AE has ever-growing storage! Don=92t worry about storage limits. > > http://windowslive.com/Tutorial/Hotmail/Storage?ocid=3DTXT_TAGLM_WL_HM_Tu= torial_Storage_062009 --=20 Claudio --00c09ffb56b96d093f0474ccebb3--