Transactions can improve database performance

This seemed counter-intuitive to us when we stumbled upon it, but apparently wrapping update statements inside a transaction can improve the performance of the statement.

We were working on an import script that imports a large set of new data and also updates related records in existing data. The process runs asynchronously so we weren’t concerned too much with performance–it’s a long running process updating 7,000,000+ existing records with related data from 100,000 new ones.

However, we were surprised to notice that the same queries took over 1,000 seconds to run through our application whereas they ran in about 150 seconds in SQL+. After a lot of trial an error we wrapped the application queries in a transaction and the performance improved to be the same as running the statements in SQL+.

Because of the nature of the data load we don’t really need autonomous commits and thus weren’t using transactions to start with. We were very surprised to notice the speed increase after applying transactions.

Get free tech support at MAX

Macromedia has a very neat program at MAX that I’m not sure everyone is aware of. They have a support lab where attendees can come with their problems and get free tech support.

I’ll be helping out in the lab a bit, along with several other Team Macromedia volunteers, so be sure to drop by with your questions.

Speaking at MAX! Integrating with Microsoft Office

I’ve been accepted to speak at MAX again this year. I’ll be giving an updated version of the presentation I gave last year and at CFUN-04, Integrating with Microsoft Office.

I’m accepting questions or comments on what changes should be made–are there whole topics that should be discussed that weren’t? Were there things that should be dropped?

Right now it looks like I’ll be dropping the Authomation slides and am hoping to add an example using Jakarta POI and also of client-side communication between Flash and Excel.

You can view a Breezo of last year’s presentation and download the slides and examples here.

CFUN-04 is this weekend!

If you’re in the Washington, DC metro area and haven’t signed up for CFUN-04 you should do so now–it’s this weekend! Even if you’re not in the immediate area, this is a great conference for ColdFusion developers with content addressing all skill levels and a variety of topics with five different tracks.

Chafic and I are both speaking at the conference on Component Development in Flash MX 2004 and Integrating ColdFusion with Microsoft Office.