SuperSQL is an extension of SQL that allows formatting and publishing of database contents into various kinds of application data directly as a result of a query. Possible application data output formats include, but are not limited to, HTML, PDF, XML, XLS, and Ajax-driven pages. Originally, the SuperSQL query is directly converted into a single SQL query. In some query cases, this procedure returns a large intermediate table, which typically requires a long execution time and consume a lot of memory. To minimize the execution time and memory consumption, query decomposition, the process of dividing a query into sub queries whose result sets' union is equivalent to the result set of the original query, was applied to SuperSQL query processing.