OurSQL Episode 22: Things To Avoid With MySQL QueriesFeature: Things to Avoid in Queries Jan Kneschke's post on Groupwise Maximum: Calculated comparisons do not use indexes INSERT IGNORE Feedback: Email podcast@technocation.org call the comment line at +1 617-674-2369 use Odeo to leave a voice mail through your computer: or use the Technocation forums: Direct play this episode at: |
Follow me on:SearchNavigation |
Arnold -- Don't worry about
Arnold -- Don't worry about it. That's why these are "show notes" -- just notes, so to get the whole context you have to listen to the podcast.
I probably should have said "Avoid an extra SELECT by using INSERT IGNORE, REPLACE or INSERT....ON DUPLICATE KEY".
Ah, this is a potcast and it
Ah, this is a potcast and it would be smart to listen to it first before making a comment. (do I feel stupid now :s )
The postcast explains about INSERT IGNORE, REPLACE and INSERT…ON DUPLICATE KEY. It is not about how to avoid it, like the title might let you think.
Calculated comparisons do
Calculated comparisons do not use indexes:
http://blog.adaniels.nl/?p=36
Can anyone tell me why to avoid INSERT IGNORE, REPLACE and INSERT…ON DUPLICATE KEY? I can't imagine that a SELECT, than splitting out rows which should be updated/skipped and then and INSERT and/or UPDATE would be quicker. Of course it isn't fair to compare it with a plain INSERT call, because it doesn't accomplish the same.