Bill Karwin wrote:
<sa******@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com... 1. I want to calculate size of the record by mysql queries. Is it
possible..
See http://dev.mysql.com/doc/refman/5.0/...uirements.html
2. What is the best way to calculate table record size which consists
of Text type.
TEXT types, like other BLOB types and VARCHAR, use a variable amount of
storage per record, based on the content stored there. So it's hard to
predict the amount of storage accurately. You have to fetch each record and
see what's stored there.
Regards,
Bill K.
Thx for ur reply Mr.Bill.
Actually my requirement is to limit the user storage like how email
clients doing. If i do caculation on everytime when the page display,
that would be slower the server performance. Instead, is it nice if
calculate the amount of storage then store in the same record in a
clolumn while insert or update, and while fetching just SUM the storage
column. Or is there any other way!!!
And let say.. if i have value 12 in INT type column, and I have value
12345 in other INT type column.. does both occupy 4 bytes each.
Regards,
@wahab.