in reply to DBD::mysql and binding placeholders

Hmm, If I execute it in the mysql console, I see no difference at all (i have over 5 million rows) whether I query for ..'digit' or digit. Are you sure your results weren't cached?
  • Comment on Re: DBD::mysql and binding placeholders

Replies are listed 'Best First'.
Re^2: DBD::mysql and binding placeholders
by dragonchild (Archbishop) on Sep 22, 2004 at 18:40 UTC
    I was describing a small test case, and a few million rows on a strong machine may not notice a difference. The actual query was comparing strings against BIGINTs in two tables, then joining them. The MySQL manual discusses this as well, which is why I realized my mistake once I saw what DBI->trace() said was actually happening.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

    I shouldn't have to say this, but any code, unless otherwise stated, is untested

Re^2: DBD::mysql and binding placeholders
by runrig (Abbot) on Sep 22, 2004 at 18:21 UTC
    No difference as in both being fairly fast or slow? Is there an index on the field? Does MySQL have a way to print out the query plan to tell you if an index is being used?