trips
NYC-style taxi trips, Hive-partitioned by region and date.
| Column | Arrow type | Kind | Footer min | Footer max |
|---|---|---|---|---|
| trip_id | int64 | data | 0 | 2499 |
| pickup_hour | int32 | data | 0 | 23 |
| passengers | int32 | data | 1 | 4 |
| distance | double | data | 0.33 | 40.0 |
| price | double | data | 3.61 | 179.98 |
| tip | double | data | — | — |
| payment | string | data | — | — |
| region | string | partition | — | — |
| date | string | partition | — | — |
Why partition columns are different
Partition columns are not stored inside the Parquet files at all — their values come from the directory names, which is why a predicate on one can eliminate whole files without opening any of them. Predicates on data columns have to fall back to footer statistics, which skip row-groups instead.
Per-column size on disk
one file, footer-only
Compressed bytes per column across one representative file. This is the table that
explains column projection: reading passengers instead
of price is the difference between
5.7 KB and
115.4 KB.
A COUNT(*) needs row counts, not values, so the engine resolves it to
the narrowest column on disk rather than the first declared one. On this file that is
passengers at
5.7 KB — against
403.2 KB for every column.
Physical layout
- Sampled file
- /opt/render/project/src/data/trips/region=EU/date=2024-01-01/part.parquet
- Row-groups in that file
- 8
- Rows in that file
- 20000
- Rows per row-group
- ~2500
- Column bytes in that file
- 403.2 KB
- Files in the dataset
- 15
- Dataset size
- 6.0 MB
The row-group count is what sets the granularity of statistics-based skipping: more row-groups means finer pruning but a larger footer to read.
| Partition values | Path | Size |
|---|---|---|
| region=EU date=2024-01-01 | /opt/render/project/src/data/trips/region=EU/date=2024-01-01/pa… | 409.9 KB |
| region=EU date=2024-01-02 | /opt/render/project/src/data/trips/region=EU/date=2024-01-02/pa… | 409.6 KB |
| region=EU date=2024-01-03 | /opt/render/project/src/data/trips/region=EU/date=2024-01-03/pa… | 409.3 KB |
| region=EU date=2024-01-04 | /opt/render/project/src/data/trips/region=EU/date=2024-01-04/pa… | 409.2 KB |
| region=EU date=2024-01-05 | /opt/render/project/src/data/trips/region=EU/date=2024-01-05/pa… | 409.6 KB |
| region=US date=2024-01-01 | /opt/render/project/src/data/trips/region=US/date=2024-01-01/pa… | 409.4 KB |
| region=US date=2024-01-02 | /opt/render/project/src/data/trips/region=US/date=2024-01-02/pa… | 409.7 KB |
| region=US date=2024-01-03 | /opt/render/project/src/data/trips/region=US/date=2024-01-03/pa… | 410.1 KB |
| region=US date=2024-01-04 | /opt/render/project/src/data/trips/region=US/date=2024-01-04/pa… | 410.1 KB |
| region=US date=2024-01-05 | /opt/render/project/src/data/trips/region=US/date=2024-01-05/pa… | 410.3 KB |
| region=APAC date=2024-01-01 | /opt/render/project/src/data/trips/region=APAC/date=2024-01-01/… | 409.6 KB |
| region=APAC date=2024-01-02 | /opt/render/project/src/data/trips/region=APAC/date=2024-01-02/… | 410.3 KB |
| region=APAC date=2024-01-03 | /opt/render/project/src/data/trips/region=APAC/date=2024-01-03/… | 410.1 KB |
| region=APAC date=2024-01-04 | /opt/render/project/src/data/trips/region=APAC/date=2024-01-04/… | 409.4 KB |
| region=APAC date=2024-01-05 | /opt/render/project/src/data/trips/region=APAC/date=2024-01-05/… | 409.6 KB |
One query per mechanism
Open in workspaceEach of these isolates a single thing the engine does, generated against this dataset's real schema and footer statistics. Submitting one runs it for real.
| Run | SQL | Status | Duration | Read | When |
|---|---|---|---|---|---|
| #15 | SELECT region, COUNT(*) AS n, SUM(distance) AS total_distan… | success | 17.76 ms | 16.5% | 11 Oct 18:57 |
| #14 | SELECT region, COUNT(*) AS n, AVG(distance) AS avg_distance… | success | 30.01 ms | 23.2% | 11 Oct 18:57 |
| #13 | SELECT COUNT(*) AS total FROM trips WHERE trip_id > 2374 | success | 34.74 ms | 26.9% | 11 Oct 18:57 |
| #12 | SELECT COUNT(*) AS total FROM trips WHERE region = 'EU' | success | 7.99 ms | 0.5% | 11 Oct 18:57 |
| #11 | SELECT * FROM trips LIMIT 20 | success | 89.94 ms | 100.0% | 11 Oct 18:57 |
| #10 | SELECT region, COUNT(*) AS n, SUM(distance) AS total_distan… | success | 13.7 ms | 16.5% | 11 Oct 18:57 |
| #9 | SELECT region, COUNT(*) AS n, AVG(distance) AS avg_distance… | success | 28.05 ms | 23.2% | 11 Oct 18:57 |
| #8 | SELECT COUNT(*) AS total FROM trips WHERE trip_id > 2374 | success | 31.37 ms | 26.9% | 11 Oct 18:57 |
| #7 | SELECT COUNT(*) AS total FROM trips WHERE region = 'EU' | success | 8.12 ms | 0.5% | 11 Oct 18:57 |
| #6 | SELECT * FROM trips LIMIT 20 | success | 101.34 ms | 100.0% | 11 Oct 18:57 |
| #5 | SELECT region, COUNT(*) AS n, SUM(distance) AS total_distan… | success | 17.57 ms | 16.5% | 11 Oct 18:57 |
| #4 | SELECT region, COUNT(*) AS n, AVG(distance) AS avg_distance… | success | 30.89 ms | 23.2% | 11 Oct 18:57 |
| #3 | SELECT COUNT(*) AS total FROM trips WHERE trip_id > 2374 | success | 31.97 ms | 26.9% | 11 Oct 18:57 |
| #2 | SELECT COUNT(*) AS total FROM trips WHERE region = 'EU' | success | 9.06 ms | 0.5% | 11 Oct 18:57 |
| #1 | SELECT * FROM trips LIMIT 20 | success | 102.01 ms | 100.0% | 11 Oct 18:57 |