Blog

Category Filtering: 'Performance'

Remove Filter


Improving Lucee's QoQ Support Again- now 200% faster

Posted by Brad Wood
Dec 01, 2022 20:12:00 UTC

Two years ago, I published this post detailing how I had refactored the Query of Query support in Lucee to be much better and also much faster:

https://www.codersrevolution.com/blog/improving-lucees-query-of-query-support

I removed the single-threaded HSQLDB callback for grouped/aggregate and distinct selects and tuned the performance.  QoQ's are a bit of a polarizing feature in CFML.  They've suffered in the past from poor support and poor performance which has caused a lot of people to avoid them.  There are certainly places where queryMap(), queryFilter(), and queryReduce() are the best approach, but there are also times where you simply can't beat the readability and conciseness of an ordered,  aggregated select.  I know developers who tell me they never use "reduce" higher order functions because they are too confusing, but I've never met a developer who didn't understand "GROUP BY department"! 

I've got several other ideas to increase the feature set of QoQ in CFML including native support for INNER and OUTER joins as well as this idea of exposing CFML string, number, and date functions directly in QoQ.  I've also put in a handful of tickets for Adobe ColdFusion to invite them to follow in the improvements I've added to Lucee. I'd send them pulls, if I could : (

Improving Lucee's Query of Query Support

Posted by Brad Wood
Sep 12, 2020 01:29:00 UTC

One of the really great features of CFML is the ability to run SQL against a result set in memory.  This allows you to union separate results together or even apply additional filtering on an exiting result if you can't control what the DB gives you.  Like everything, there is a time and a place for this.  There are people who strongly dislike QoQ (query of queries) but my take is that I think they're great when used with relatively small data sets and unless performance profiling shows they are causing issues, I have no problems using them.  

Intro To Couchbase For Caching And NoSQL - Webinar Tues 4/8/2014 1PM EDT

Posted by Brad Wood
Mar 28, 2014 23:46:00 UTC

I will be presenting on how to get started using Couchbase for caching and NoSQL at a TeraTech webinar next month.  Couchbase is an up-and-coming server that mixes caching capabilities with a NoSQL JSON document store.  It has excellent performance and the best clustering/sharding/failover setup I've seen.  I'll be demoing the brand new CFML SDK for Couchbase as well as the Ortus Railo Extension.  Here's the session description.


 

nteractive applications have changed dramatically over the last 15 years. Today, they must support millions of users simultaneously and downtime is no longer acceptable. Three mega trends – Big Data, Big Users, and Cloud Computing – are driving the adoption of NoSQL technology over traditional relational SQL.

NoSQL document stores are reinventing the way we design our databases and cache layers. Couchbase open source server is a unique database with unparalleled performance, automatic replication and failover. 
In this webinar:

  • how document databases differ from the traditional RDBMS
  • the benefits and tradeoffs they bring to the table
  • a hands-on look at the new CFCouchbase CFML SDK
  • native caching and session persistence via the Railo Couchbase Extension.
  • Q&A

Register for free Now

ColdBox Connection today on CacheBox

Posted by Brad Wood
Jun 09, 2011 17:02:00 UTC
Just a friendly reminder about the ColdBox Connection meeting today at noon Central. ColdBox Connection is an online webinar that is held every two weeks by Team ColdBox to showcase a part of the ColdBox Platform and answer your questions. Today's is being hosted by Aaron Greenlee and will be discussing CacheBox, the enterprise caching framework which is baked into ColdBox as well as available as a separate utility for your existing apps. Here is the Connect room: http://experts.adobeconnect.com/coldbox-connection/ Hope you see you there!

Generating Primes Revisited: My Modifications To The Sieve of Eratosthenes

Posted by Brad Wood
Feb 01, 2011 11:28:00 UTC
In a recent pissing match between ColdFusion and PHP, Jared Rypka-Hauer was demonstrating the performance of a function that generated prime numbers. The discussion really wasn't about the BEST prime generator as much as it was about how much ColdFusion can kick PHP's puny butt all over town. Never the less, I piped up in the comments to ask Jared to compare a prime number generator that I wrote a while back based on the Sieve of Eratosthene. After Jared asked some good questions about how my code worked I figured it was time I stopped high-jacking the comments of the PHP pooper train. I decided to spin off a new post to highlight some significant performance gains I was able to produce.

BlogCFC Code Formatting Not Thread Safe (With Example)

Posted by Brad Wood
Dec 04, 2009 00:58:00 UTC
I found an interesting little bug in the BlogCFC implementation of ColdFISH today. ColdFISH is a ColdFusion code formatting component that is instantiated once and cached as a singleton in the application scope in BlogCFC. The problem is, ColdFISH looks like it wasn't intended to be used as a singleton. It makes use of the variables scope to store the Java StringBuffer class it uses to gather up your formatted code as well as a number of other variables used to parse the code it is formatting. This means when two or more people hit a BlogCFC entry with larger code samples, race conditions exists.

Give Your Opinion, Get SeeFusion For Free

Posted by Brad Wood
Nov 29, 2009 23:43:00 UTC
Our friends at Webapper are giving away free copies of SeeFusion (an awesome ColdFusion server monitoring tool) to the first 100 200 people to take their survey on ColdFusion consulting. Go check out here: http://www.webapper.com/blog/index.php/2009/11/25/coldfusion-survey/ UPDATE: Webapper is now going to give away SeeFusion to the first 200 people to take their survey. Can't beat that!

Google AdSense Servers Tripling My Traffic?

Posted by Brad Wood
Nov 09, 2009 07:15:00 UTC
I threw some AdSense ads on my site the other day. I don't think I'll be getting rich any time soon though. I'm up to 58 cents so I figure I'll be seeing a check from Google in about 8 years. :) Anyway, while troubleshooting an error in my blogCFC I noticed I kept getting each error E-mail three times. Looking at the User Agent showed that "Mediapartners-Google" was hitting every URL I hit twice. Incidentally, I have two Google ads on every page of my site.

MS SQL Server Table Variable And Nested Select Gotcha (Bug?)

Posted by Brad Wood
Oct 28, 2009 05:54:00 UTC
My coworker found this interesting little SQL Server behavior today that was quite startling at first glance. It's like punching 2 + 2 into your calculator and having the result come back as 5. After pin-pointing the cause for the behavior, it ALMOST makes sense... except for the fact that it doesn't make sense at all. It involves a randomized sub-select and table variables.

How To Get The SQL Server SPID Out Of SeeFusion

Posted by Brad Wood
Sep 22, 2009 05:19:00 UTC
I've never kept too quiet about my affection for SeeFusion as a ColdFusion monitoring tool. I use it for debugging, performance monitoring, and basic metrics gathering. Here's an old note on the JDBC URL wrappers that I found myself digging up last week. I don't even think you can find this nugget on the official SeeFusion site.

Site Updates

Entries Search