On Tue, 2011-04-19 at 09:06 -0500, Tim Soderstrom 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).
Agreed, the parse/optimize time for 10000 key/value statements in a transaction is almost unmeasurable in Drizzle. When you get into the millions I think there is a small measurable overhead. > >> That is, if you wanted to have all those statements go through at the same > >> time. I think if you wanted to improve speeds of updates, you may want to > >> look at PBMS, the BLOB streaming stuff, which functions similar to > >> HandlerSocket. I'm not sure if HandlerSocket can be built into Drizzle > >> but, last I remember, PBMS is already there ready to go as a plugin. > > > > This isn't about blobs. How would PBMS help? > > It's a misnomer that PBMS handles just BLOBs. Like HandlerSocket, it can deal > with pretty much any sort of data as far as I'm aware. Paul wrote a post > about this: > > http://pbxt.blogspot.com/2010/12/handlersocket-why-did-out-version-did.html > > 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). I was actually discussing NoSQL access with Brian at the Drizzle Developer Day. I like his idea of using a memcached style access. The apps I have written for companies use memcached anyway, so it would be pretty trivial to convert these. Kind Regards -- Andrew Hutchings - LinuxJedi - http://www.linuxjedi.co.uk/ _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

