I found the following error with mysql server version 3.23.52.
mysql> select snb,id_servicio from Abonados_Servicios where
snb="1144293549";
9 rows in set (0.01 sec)

mysql> select snb,id_servicio from Abonados_Servicios where snb=1144293549;
9 rows in set (45.61 sec)

mysql> describe Abonados_Servicios;

Field                         Type         Null     Key     Default
Extra
snb                           char(10)              PRI
id_servicio                   char(2)               PRI
estado                        char(1)                       A
fecha_alta                    datetime                      0000-00-00
00:00:00 
fecha_baja                    datetime     YES              NULL
fecha_ultima_modificacion     datetime     YES              NULL
User                          char(8)

select count(*) from Abonados_Servicios;
1590987 

As you can see , the snb field is char(10) type.

When you run the first sql statement :
select snb,id_servicio from Abonados_Servicios where snb="1144293549";
it takes :
9 rows in set (0.01 sec)
to complete which is a good performance.

But when you run the second sql statement :
select snb,id_servicio from Abonados_Servicios where snb=1144293549;
it takes :
9 rows in set (45.61 sec)
to complete.

I'd like to ask you if it wouldn't be better to rise an error or a warning
for the second statement instead of taking such amount of time.

Thanks
Mario Gatica

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to