Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: MySQL DELETE with INNER JOIN

by sundialsvc4 (Abbot)
on Mar 23, 2011 at 19:24 UTC ( [id://895095]=note: print w/replies, xml ) Need Help??


in reply to MySQL DELETE with INNER JOIN

To my way of thinking, especially with regard to DELETE, this is an illustration of why “obvious simplicity always wins.”   I do not want a “clever” way to delete 10,000 somethings.   Instead, I want to write logic that, say, queries for the keys to be deleted, and then, in a transaction, deletes those keys.   (Possibly a sensibly-sized group at a time, blah, blah, blah...)   The resulting code may or may not be “efficient,” in some people’s minds, but (a) it is certainly efficient enough, and (b) it makes it easy to dump out a list of the keys that you think you’re going to delete while you are debugging the thing, without actually doing it (yet).   My main objective in writing code like this is to make damm sure that I am not about to shoot off my own foot; not to shoot it off a little bit faster.

As far as the “appropriateness” of this post goes, well, yes, it is not quite “on-topic,” but then again, most of us do use MySQL quite-a-bit in connection with Perl, so IMHO it is “tangentally related” enough not to warrant “consideration” by the mods.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://895095]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-25 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found