A DECIMAL data type would probably be faster than a CHAR when doing arithmetic, and an integer type would be faster yet. I don't know about JOINs on indexed columns. I also don't know about substring and LIKE operations with DECIMAL types, but they should be a lot faster with CHAR than with integer types.
Sorry, that's about as far as I can guess. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, October 27, 2006 2:10 AM > To: 'Jerry Schwartz'; mysql@lists.mysql.com > Subject: RE: Speed of DECIMAL > > > From: Jerry Schwartz [mailto:[EMAIL PROTECTED] > > > > What is going slower, INSERT / UPDATES or SELECTS? > > Complex SELECTs > > > CHAR should make for quite efficient processing, since to a > > large degree nobody cares what's in there: it just slams the > > data in, or does a simple byte-by-byte comparison. There is > > probably hardware support for that kind of operation. Decimal > > arithmetic, on the other hand, requires more data > > manipulations. The size of the column probably is outweighed > > by the more complex data handling. > > I am doing the following operations: > > - Joins based on indexed columns > - Division by power of 10 > - Substring > - LIKE comparisons in the form of decimal_column LIKE 'number%' > > Is any of these especially slow decimals? > How would they work with BIGINT(15) UNSIGNED ZEROFILL? > > > No doubt someone whose internals experience is more recent > > than mine will chime in. > > > > Regards, > > > > Jerry Schwartz > > Global Information Incorporated > > 195 Farmington Ave. > > Farmington, CT 06032 > > > > 860.674.8796 / FAX: 860.674.8341 > > > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, October 26, 2006 4:37 AM > > > To: mysql@lists.mysql.com > > > Subject: Speed of DECIMAL > > > > > > Hi, > > > > > > I was hoping to speed up my database operations a bit by > changing > > > some colums in my database from CHAR(15) ASCII to DEC(15) > UNSIGNED > > > ZEROFILL. I was expecting a speedup as DEC(15) is more > > compact, and > > > this columns are also part of InnoDB indices. In contrary to my > > > expectations, running my test suit took approximately three > > times as > > > much time, as before. > > > > > > Could anybody give me a probable reason for this slowdown? > > > > > > Thx > > > > > > ImRe > > > > > > P.S.: Ver 5.0.24a > > > > > > > > > > > > -- > > > MySQL General Mailing List > > > For list archives: http://lists.mysql.com/mysql To unsubscribe: > > > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]