On Tue, Apr 19, 2011 at 4:06 PM, Tim Soderstrom <[email protected]> wrote: > > On Apr 19, 2011, at 8:55 AM, Olaf van der Spek wrote: > >> On Tue, Apr 19, 2011 at 3:41 PM, Tim Soderstrom >> <[email protected]> wrote: >>> Perhaps I am misunderstanding you, but would a transaction not be what >>> you're asking for? >>> >>> BEGIN; >>> UPDATE ... ; >>> UPDATE ... ; >>> ... >>> COMMIT; >> >> Eh, no. That'd still be 10000 update statements. > > Yes, but the writes will occur in a single transaction when you COMMIT so it > should be faster than doing isolated UPDATEs. Use a prepared statement if you > want to get even more speed out of it (though I suspect any speed > improvements may be sort of marginal, and that's assumption not bounded by > any particular benchmarks I have done that show differences either way).
I'd prefer a solution that's as simple as the original. > It's faster because you don't use the SQL optimizer, though I don't think you > can do transactional updates with it. Still, if it's anything close to the > speed of HandlerSocket, I would take a look at this since you're doing a > bunch of key-value updates anyway (hence you don't need a SQL layer for those > really). HandlerSocket isn't available by default (AFAIK). -- Olaf _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

