Hi there,
I wanted to subtmit a weird finding while optimizing our backend access (MySql 5.0.32-Debian_7etch1-log).
I have a table with the primary indexed column user_id (mediumint ( 8 )).
With the following code, we update some user’s infos:
UPDATE phpbb_users SET flastcellupload = ‘1188382472’ , fidcell=‘10459’ WHERE user_id = ‘10915207’;Query OK, 0 rows affected (3.38 sec)Rows matched: 0 Changed: 0 Warnings: 0
Note that user_id 10915207 does not exists (and card(user_id)=670+K).
This request takes 3+s to be executed.
And what if I remove the quote around the number, as follows?:
UPDATE phpbb_users SET flastcellupload = ‘1188382472’ , fidcell=‘10459’ WHERE user_id = 10915207;Query OK, 0 rows affected (0.00 sec)Rows matched: 0 Changed: 0 Warnings: 0
As you can see, it takes almost nothing to perform.
I ran some similar tests on SELECT and I can say it has no effect (very quick in both syntaxex).
Any toughts?
Thanks in advance,
Sdl