Re: How much space take each column in table
Posted by:
Rick James
Date: September 14, 2010 10:55PM
Will this do?
SELECT AVG(LENGTH(blob_field)) + 2 FROM tbl;
(Of course, it will have to scan the whole table.)
The "+2" is for the length field for BLOB.
Avg_row_size minus the fixed width fields gives you avg width of all the VARCHARs, BLOBs, etc.
Oh, yes. I keep forgetting about this oddball:
http://dev.mysql.com/doc/refman/5.0/en/procedure-analyse.html
Subject
Written By
Posted
September 13, 2010 08:07AM
September 14, 2010 08:30PM
September 14, 2010 08:34PM
September 14, 2010 09:49PM
September 14, 2010 10:09PM
Re: How much space take each column in table
September 14, 2010 10:55PM
September 15, 2010 12:58AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.