Rob's tech blog...

ColdFusion CachedWithin & Max Rows - bug or feature?

Recently a colleague and I have been working through the beating heart of our flagship application to try and improve performance and throughput. There was nothing wrong with the performance we were getting but we'd got some time to spare and so figured tweaking the code to get the absolute maximum out of it would be a fun excercise for a Thursday afternoon. One of the areas we looked at was caching some of the common MySQL queries that are called on every request using the CachedWithin attribute. Having merrily rolled this out we fired up our test site expecting pleasing improvements in page load times and instead found that the site was pretty much completely borked.

Read the rest of this post »

Don't use Query of Queries for simple datasets!

I've just finished a whole batch of optimisation routines for an Excel import/export that had to run on our CF8 based CRM system (thanks to Ben Nadel for his amazing POI CFC). The export had a tricky requirement whereby each row (of some 56,000 rows) had n items which needed to be set according to a lookup in a link table in the DB. Rather that running each comparison as a query against the live DB (56,000 rows x 20+ items = 1,120,000 queries!) I figured I could pull the whole link table into memory using a simple query and then use Query of Queries to save a bit of time.

Read the rest of this post »

11
To Posterous, Love Metalab