Re: determining how many bytes a mysql row or table is consuming
| From: | DL Neil | Date: | Thu, 08 Nov 2001 10:47:57 +0000 |
| Subject: | Re: determining how many bytes a mysql row or table is consuming | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73859@lists.php.net to get a copy of this message | ||
> I'm interested in determining the bytes consumed by rows or entire
> tables... we have a (large) table of application forms which users can
> SAVE to submit to us at a later date... the problem is cleaning out
> those which consume space and never come back to complete.
>
> So, i'd be wanting to find the diskspace consumed by certain rows (eg
> WHERE status='saved' or WHERE folder='trash').
>
> Any ideas? Only thing I can think of is to jion all the fields together
> into one string and determin it's length, but i'm sure there's gotta be
> an easy way.
>
> Note: This doesn't have to be incredibly accurate either... if it was
> 80% acurate, this would be sufficient.
Justin,
In the (MySQL) manual check out 7.3.1 Column Type Storage Requirements and 8.1 MyISAM Tables (or the
equivalent
for your chosen table format).
Regards,
=dn