Update 'How fast are really the analytical DBMS?'
parent
4e3a7415aa
commit
8ef9c5a3ad
|
@ -10,6 +10,32 @@ I did a small experiment with a synthetic dataset I created for the PyCon Spain
|
|||
|
||||
![Table](https://git.guillemborrell.es/guillem/blog/raw/branch/main/images/analyticdbms/Screenshot_20230212_215503_Chrome.jpg)
|
||||
|
||||
The query is designed to crash naive query engines, with a CTE and two nested aggregations:
|
||||
|
||||
```sql
|
||||
with by_nplayers as (
|
||||
SELECT
|
||||
max(toss) as toss,
|
||||
count(*) as qty,
|
||||
count(*) as nplayers,
|
||||
game
|
||||
FROM
|
||||
boards
|
||||
GROUP BY
|
||||
game
|
||||
)
|
||||
select
|
||||
sum(qty) as qty,
|
||||
toss,
|
||||
nplayers
|
||||
from
|
||||
by_nplayers
|
||||
group by
|
||||
toss, nplayers
|
||||
order by
|
||||
nplayers, toss desc
|
||||
```
|
||||
|
||||
Here are the results for postgresql
|
||||
|
||||
![Postgresql timings](https://git.guillemborrell.es/guillem/blog/raw/branch/main/images/analyticdbms/Screenshot_20230212_213038_Chrome.jpg)
|
||||
|
|
Loading…
Reference in a new issue