Improve performance of db-benchmark query 8
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Is your feature request related to a problem or challenge?
Query 8 in db-benchmark is slower than other queries
https://github.com/MrPowers/mrpowers-benchmarks
The query is as follows
```sql
select id6, largest2_v3 from
(select id6, v3 as largest2_v3, row_number() over (partition by id6 order by v3 desc) as order_v3
from x
where v3 is not null) sub_query
where order_v3 <= 2
```
### Describe the solution you'd like
* Profile / analyze this query
* Improve performance
It might be the part `row_number() over (partition by id6 order by v3 desc)` or rather the sorting is the most expensive.
`
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.