Skip to Content
Former Member
Mar 19, 2008 at 02:44 AM

How to Agrregate data in OQL


I'm currently doing some memory analysis on a ColdFusion application, for which this tool has been absolutely incredible.

ColdFusion has objects/class in it called CFC's (ColdFusion Component), which behind the scenes are made up of multiple Java Objects.

The Java class for an instance of a CFC is an object of class coldfusion.runtime.TemplateProxy

The TemplateProxy object has a field on it, 'cfcFullyQualifiedName', which stores the class name of the ColdFusion object, e.g. 'security.User'.

Since every CFC instance is a instance of type coldfusion.runtime.TemplateProxy, I'm trying to use OQL to determine how many of each CFC type there is, and how much retained heap each CFC type has.

What I have to begin is:

select toString(t.cfcFullyQualifiedName)


coldfusion.runtime.TemplateProxy t

This works very well, as it shows me every type of CFC that is in our system, but I want to be able to get a count of each.

Essentially I want to be able to do something like:


count(t) as countInstances,



coldfusion.runtime.TemplateProxy t

group by t.cfcFullyQualifiedName

(if I was using regular SQL)

From that count, I would like to get the retained heap on a per cfcFullQualifiedName level - basically doing a retained heap per class, just not a Java Class, but the ColdFusion CFC class.

Looking at the OQL help and the Analyzer, I believe this may be possible, but I can't see any documentation on how to do it, and I couldn't work out how to use the 'define grouping' button.

Any help would be appreciated.