1 message in com.mysql.lists.perldata type conversion overhead| From | Sent On | Attachments |
|---|---|---|
| Safford, Brian | 25 Jan 2001 09:57 |
| Subject: | data type conversion overhead![]() |
|---|---|
| From: | Safford, Brian (bria...@eds.com) |
| Date: | 01/25/2001 09:57:12 AM |
| List: | com.mysql.lists.perl |
I am using DBI 1.14, Msql-Mysql-modules-1.2215, and mysql-3.22.32, and I have noticed while browsing the output from 'mysqladmin processlist' that some SELECT and INSERT statements show character values ( the data is enclosed in single quotes ) rather than numeric for columns that are defined to be numeric.
For example, I have a table defined:
CREATE TABLE sndJan2001 ( msgid INT UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT, usrid INT UNSIGNED NOT NULL DEFAULT '0', ts TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' KEY msgid ( msgid ), KEY usrid ( usrid ), KEY ts ( ts ) )
I will then see SELECT statements ( coming from the 'mysqladmin processlist' output ) that look like:
... SELECT msgid FROM sndJan2001 WHERE msgid = '224553'
and other times it will look like:
... SELECT msgid FROM sndJan2001 WHERE msgid = 224533
I have two questions. First, is there any overhead involved in the conversion that must be taking place? Second, if there is overhead, how do I force the Perl DBI to NOT use quotes? I generally use placeholders within my 'prepare' statements, if that makes any difference.
Regards,
Brian Safford Consultant, Senior Electronic Data Systems E.solutions




