+1, I like.

On Mon, 22 Dec 2008, Jay Pipes wrote:

Personally I have typed ON DUPLICATE KEY IGNORE many times, thinking that was the actual syntax...

+1 on that :)

-jay

Monty Taylor wrote:
dormando wrote:
It's for queue management, so we (intend) for the rows to get dropped if
the PKID conflicts.

The logic is actually INSERT IGNORE INTO ... unless database does not
have INSERT IGNORE, in which case use REPLACE INTO. Which could be much
slower.

I like the idea of ON CONFLICT ... all we really need is ON CONFLICT
DROP or IGNORE, and don't really need ON CONFLICT MUNGE_MY_DATA.

Agree. I like the ON CONFLICT idea...
It's along the same idea of how you do "ON DUPLICATE KEY UPDATE" in
SQLite. ON CONFLICT blah blah blah.

You know, we already have ON DUPLICATE KEY syntax - how about INSERT ...
ON DUPLICATE KEY IGNORE? or ON DUPLICATE KEY LOG ..

For that matter, we could perhaps make ON CONFLICT also a synonym for ON
DUPLICATE KEY perhaps? ... best of both worlds?

-Dormando

On Mon, 22 Dec 2008, Brian Aker wrote:

Do you use the ignore to dump rows? Or do you just want to muddle
through the data? Would it be ok to encourage default values?

The slippery sloap is allowing null on not null columns. I would like
to avoid that, most everything else I am game for.

Personally I use IGNORE to handle loads where I have a primary key and
I just want duplicate data dropped.

Cheers,
 --Brian

On Dec 22, 2008, at 2:05 PM, dormando <[email protected]> wrote:

No, please don't go back into any corner.  Discuss, please!

Are you a huge fan of the IGNORE keyword?

-jay
I personally (and my company) use the crap out of it. Along with LOAD
DATA INFILE that was previously discussed. If one or the other goes
away, do we have alternatives?

Think I've used INSERT IGNORE INTO ... SELECT FROM ... a bunch to
collapse data. There isn't really a way to handle bailouts in the
middle, nor is it always reasonable to adjust all of the data first.
ie; You want the constraint on one table but not another, for
different views of the data.

We could potentially get by without using INSERT IGNORE in mogilefs
by handling and ignoring the errors... but bulk requeue attempts
would bail out in the middle, so we'd have to only do one at a time,
which is slow.

-Dormando

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp





_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to