Quoting Rasmus Nielsen <[email protected]>: [snip] > Yes I just found out after playing around with mysql's general log. > Thank you for your reply anyway! > > I've decided to change the problematic column data types to int(11) - > rails' default for mysql. The reason I made the (premature) optimization > in the first place was that I thought it would be no biggie to just use > smaller integer data types and that it would have no impact (other than > lower memory consumption) - that was not the case :)
How much does memory cost? How much does disk space cost? How many users and years will it take to recoup the cost of overriding the defaults? For most projects, programmer time is by far the expensive and scarce resource. When you have enough users to make the optimization worthwhile, you will have plenty of revenue to pay for it. Until then, it's premature. I made a similar "optimization" several months back. I figured out later that I would have to have thousands of users with several hundred logged in simultaneously before I begin to make up the costs of the time spent in pre-mature optimzation. The illustration I came up with is: when I started programming professionally (1973), 40MB of disk storage was around $40K, three years of my salary. Last year I bought 250GB of external USB disk storage for just over $100, about two hours of my salary. Figure four hours of an entry level programmer's salary. The day and a half I spent squeezing three booleans into one byte of disk storage and trying to keep that one byte out of the model API will never be recovered. When contemplating an optimization, be sure you are optimizing the scarce or expensive resources. HTH, Jeffrey --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

