> I am curious about how to best define the size of fields in mysql. Is
> there some size that are better used than others?
>
> For example without thinking about it to much I would tend to size
> fields in multiples of 10 - 20, 50, 100, 200 etc... Is this the best
> answer?

If there are better sizes, they'd be at 4, 8, 16, 32, 64, etc which are more
amenable to computers than humans...

I don't think it matters, though, for your varchar fields.

Even if it did make a difference, it's more important to have fields the
right size for the DATA than for the performance.

I'm betting you'd have to be talking about MILLIONS of rows before the field
size would make a significant performance difference, if every.

TIP:
The way to worry about performance for any kind of application that is not
completely unblazed territory (where *NO* man has gone before) is to:
Not worry about it except to follow general rules of thumb that everybody
else is following.
Then test your app to see if it's fast enough.
If it's not, then profile pieces until you find out *WHERE* it's not fast
enough for significant chunks of processing time.
Fix that part.

90% of your performance is being done in 10% of your code.  Optimize that
10%, and you either are done, or you are in very big trouble.  Optimizing
anything else before that 10% is just a waste of your time and resources.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to