Home » Performance » MySQL » is using '' around number bad?
is using '' around number bad? [message #327] Tue, 07 November 2006 11:19 Go to next message
masterzen  is currently offline masterzen
Messages: 9
Registered: October 2006
Junior Member
Hi,

I remind reading somewhere (was it on mysqlperformanceblog or in one of Peter's presentation) that doing:

select * from mytable where param='12334'
instead of
select * from mytable where param=12334

was bad performancewise.

Can someone confirm this and explain why, please?

Thanks,
Re: is using '' around number bad? [message #328 is a reply to message #327 ] Tue, 07 November 2006 11:33 Go to previous messageGo to next message
inner  is currently offline inner
Messages: 13
Registered: November 2006
Location: Lithuania
Junior Member
Hi,

i think this is pretty self-explanatory: http://www.mysqlperformanceblog.com/2006/09/08/why-index-cou ld-refuse-to-work/

Regards,
Aurimas
Re: is using '' around number bad? [message #329 is a reply to message #328 ] Tue, 07 November 2006 11:58 Go to previous message
masterzen  is currently offline masterzen
Messages: 9
Registered: October 2006
Junior Member
inner wrote on Tue, 07 November 2006 11:33

Hi,

i think this is pretty self-explanatory: http://www.mysqlperformanceblog.com/2006/09/08/why-index-cou ld-refuse-to-work/


Thank you, I should have searched it myself.

Actually I was thinking it the other way (ie integer field and number as string in request).
It seems it is harmless in this case (although it is misleading).
Previous Topic:Partial replication
Next Topic:Upgrade to Mysql Cluster
Goto Forum:
  


Current Time: Sun Jul 5 17:20:09 EDT 2009

Total time taken to generate the page: 0.01070 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.