ColdFusion Query of Queries

Query of Queries has been introduced in ColdFusion 5.0 and a very helpful feature for the programmers. This has been a great tool in how we access the data and manipulate if from any source. A developer can re-query” an existing dataset already compiled from a procedure call.

A query that retrieves data from a record set is termed as Query of Queries. After you generate a record set, you can interact with its results as if they were database tables by using Query of Queries.

One of the major exposures of ColdFusion is the use of Query of Queries feature. Those who are familiar with SQL or have interacted with databases, you might be known of some of its features

Using of Query of Queries has many benefits:

If you want to access the same table again and again, you can use Query of Queries which will reduce the access time as the data is already in the record set and enhances the efficiency.

Query of Queries can handle a table of 5000 to 50000 rows and is only limited by the memory of the ColdFusion Server host machine.

You can easily manipulate cached query results in many different ways. You can query a database once, and then use the results to generate several different summary tables.

You can obtain drill-down, master-detail information for which you do not access the database for the details.
Query of queries can be used to combine data from two different datasets without having an ODBC connection created by the admin. This is an amazing feature and should work with different types of databases like Oracle vs SQL Server.


Related Article: ColdFusion Replace Function: Uses & How To Implement