# Super charging native QoQ performance in 7.1

**URL:** <https://dev.lucee.org/t/super-charging-native-qoq-performance-in-7-1/17245>\
**Category:** dev\
**Tags:** qoq, lucee-71, performance\
**Created:** [May 9, 2026, 3:51pm UTC](https://dev.lucee.org/t/super-charging-native-qoq-performance-in-7-1/17245 "2026-05-09T15:51:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zackster](https://dev.lucee.org/user_avatar/dev.lucee.org/zackster/32/3484_2.png) [@Zackster](https://dev.lucee.org/u/Zackster)\
**Post date:** [May 9, 2026, 3:51pm UTC](https://dev.lucee.org/t/super-charging-native-qoq-performance-in-7-1/17245/1 "2026-05-09T15:51:29Z")

</div>

Decided to revisit the native QoQ performance for 7.1

[https://luceeserver.atlassian.net/browse/LDEV-6308](https://luceeserver.atlassian.net/browse/LDEV-6308)

This change landed in 7.1.0.119-SNAPSHOT, builds on the [previous work](https://luceeserver.atlassian.net/browse/LDEV-4298) from Brad, but removes the parallel approach it introduced (multi threading has it’s own cost, your local machine might have a few spare cores, but your production server probably doesn’t!) and instead uses the same path as cfquery JBDC to build the query result

> [@Improving Lucee's QoQ Support Again- now 200% faster](https://dev.lucee.org/t/improving-lucees-qoq-support-again-now-200-faster/11597):
>
> I’ve submitted another pull request to Lucee 6 which re-works Lucee’s Query of Query support again-- this time using parallel Java streams to double the performance of QoQs up to 1 Million rows in size. Check out this blog where I go over what changed, and showcase a large set of performance metrics comparing Lucee 5.3.10 to the Lucee 6 snapshots (with my patch applied). And scroll down to the bottom for some rather embarrassing graphs including Adobe ColdFusion confused

Let’s just say it’s a little faster, despite being only single threaded per request!

Results from 32 threads running under load, 100k cycles

Narrow a few cols, wide 10 cols

| Test | Before ops/s | After ops/s | Δ ops/s | Before GCs | After GCs | Δ GCs | Before pause | After pause | Δ GC pause |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| narrow-50 | 65,491 | 92,829 | **+42%** | 9 | 7.5 | -17% | 76 | 66 | -13% |
| narrow-200 | 64,049 | 98,863 | **+54%** | 10 | 7 | -30% | 84 | 52 | -38% |
| narrow-1k | 62,030 | 87,957 | **+42%** | 12 | 8.5 | -29% | 99 | 65 | -35% |
| narrow-5k | 30,438 | 63,773 | **+110%** | 15.5 | 13.5 | -13% | 138 | 113 | -18% |
| narrow-20k | 10,202 | 30,579 | **+200%** | 38 | 26 | -32% | 305 | 261 | -14% |
| wide-50 | 61,590 | 88,552 | **+44%** | 10 | 9 | -10% | 87 | 68 | -22% |
| wide-1k | 21,893 | 66,332 | **+203%** | 21.5 | 14.5 | -33% | 162 | 116 | -29% |
| wide-20k | 3,043 | 9,101 | **+199%** | 159 | 82 | -48% | 720 | 578 | -20% |
| orderby-1k | 51,207 | 78,913 | **+54%** | 12.5 | 9.5 | -24% | 112 | 67 | -40% |
| orderby-20k | 5,927 | 19,131 | **+223%** | 82 | 38 | -54% | 516 | 365 | -29% |
| groupby-1k | 50,996 | 77,561 | **+52%** | 16 | 11 | -31% | 142 | 90 | -37% |
| groupby-20k | 5,899 | 15,079 | **+156%** | 140.5 | 54 | -62% | 548 | 428 | -22% |
| distinct-1k | 46,530 | 65,777 | **+41%** | 19 | 16 | -16% | 150 | 124 | -17% |
| distinct-20k | 6,269 | 14,975 | **+139%** | 139 | 61 | -56% | 547 | 443 | -19% |
| having-1k | 50,948 | 77,800 | **+53%** | 16 | 12.5 | -22% | 141 | 89 | -37% |
| unionall-1k | 47,255 | 72,912 | **+54%** | 14.5 | 11 | -24% | 116 | 83 | -29% |
| uniondistinct-1k | 6,318 | 7,617 | **+21%** | 134 | 119 | -11% | 731 | 689 | -6% |
| **AGGREGATE** | — | — | — | **1697** | **1000** | **-41%** | **9342** | **7387** | **-21%** |

---

<div class="post-metadata">

**Author:** ![dawesi](https://dev.lucee.org/user_avatar/dev.lucee.org/dawesi/32/122_2.png) [@dawesi](https://dev.lucee.org/u/dawesi)\
**Post date:** [June 7, 2026, 1:50pm UTC](https://dev.lucee.org/t/super-charging-native-qoq-performance-in-7-1/17245/2 "2026-06-07T13:50:23Z")

</div>

Trying to understand this, so for large datasets (100-500k rows) is it slower?

Just trying to decode what you’ve done here.

---

<div class="post-metadata">

**Author:** ![Zackster](https://dev.lucee.org/user_avatar/dev.lucee.org/zackster/32/3484_2.png) [@Zackster](https://dev.lucee.org/u/Zackster)\
**Post date:** [June 7, 2026, 3:48pm UTC](https://dev.lucee.org/t/super-charging-native-qoq-performance-in-7-1/17245/3 "2026-06-07T15:48:45Z")

</div>

it’s universally faster and uses less memory, larger datasets benefit even more so!

---

<div class="post-metadata">

**Author:** ![dawesi](https://dev.lucee.org/user_avatar/dev.lucee.org/dawesi/32/122_2.png) [@dawesi](https://dev.lucee.org/u/dawesi)\
**Post date:** [June 30, 2026, 7:27am UTC](https://dev.lucee.org/t/super-charging-native-qoq-performance-in-7-1/17245/4 "2026-06-30T07:27:31Z")

</div>

> [@Zackster](#):
>
> asets benefit even more so!

Nice work, will have to come over and have a beer/coffee sometime… based in Wantirna (vic/au)
