At 16:35 -0700 4/29/05, Hassan Schroeder wrote:
Paul DuBois wrote:

Before MySQL 5, DECIMAL values are stored as strings, so operations
are less efficient than for integers.

In MySQL 5, the representation of DECIMAL has changed to binary format,
so it's more efficient than before.  It's probably safe to say that
integer is still a bit more efficient, but the difference between integer
and DECIMAL will be less than before.

Are you referring to "operations" in the sense of comparing two values in a SQL statement? versus simply retrieving or inserting a value?

I'm referring to all of it. For the new DECIMAL type, storage requirements are less than before, and comparisons are faster.


Either way, do you have a feel (or access to any studies) for the impact of using DECIMAL instead of INTEGER for currency? I'd just wonder if it's enough to make up for all the required conversions going on in the app layer :-)

I don't believe any formal benchmarks have been done yet.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to