[development] Guidelines for writing efficient SQL code

Nancy Wichmann nan_wich at bellsouth.net
Wed Aug 26 22:23:09 UTC 2009

Earnie Boyd wrote:

> It makes no sense to me why a quoted numeric string is faster than a
> native integer unless the database engine is broken.

It is possible that the site has a less than optimal version of MySql, although I know they are fairly current.

At the moment, I can't remember the actual query but I do remember it surprised me a lot. It was on something like 60K rows. I also remember that quoted made it use the index, while the unquoted did not. The funny thing is that, like everyone here gas said, the standard access throughout the site is unquoted.

I may try to go in later and recreate the problem.

Nancy E. Wichmann, PMP
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.

More information about the development mailing list