explain.depesz.com

PostgreSQL's explain analyze made readable

Result: u5FS : Optimization for: Optimization for: plan #VZqr; plan #8SUJ

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 64.906 9,841.078 ↑ 1.0 1 1

Aggregate (cost=10,000,387,426.50..10,000,387,426.51 rows=1 width=32) (actual time=9,841.077..9,841.078 rows=1 loops=1)

2. 5.399 9,776.172 ↓ 19.9 13,355 1

Hash Join (cost=10,000,386,562.47..10,000,387,253.97 rows=670 width=93) (actual time=9,767.339..9,776.172 rows=13,355 loops=1)

  • Hash Cond: ((stop.durak_no)::text = s.boarding)
3. 3.460 3.460 ↑ 1.0 14,438 1

Index Scan using stop_idx on stop (cost=0.29..653.85 rows=14,438 width=53) (actual time=0.016..3.460 rows=14,438 loops=1)

4. 0.935 9,767.313 ↓ 17.8 3,561 1

Hash (cost=10,000,386,559.68..10,000,386,559.68 rows=200 width=45) (actual time=9,767.312..9,767.313 rows=3,561 loops=1)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 210kB
5. 84.973 9,766.378 ↓ 17.8 3,561 1

GroupAggregate (cost=10,000,384,190.86..10,000,386,557.68 rows=200 width=45) (actual time=9,628.807..9,766.378 rows=3,561 loops=1)

  • Group Key: s.boarding
6. 850.948 9,681.405 ↓ 2.2 517,093 1

Sort (cost=10,000,384,190.86..10,000,384,781.94 rows=236,432 width=13) (actual time=9,624.968..9,681.405 rows=517,093 loops=1)

  • Sort Key: s.boarding
  • Sort Method: quicksort Memory: 36527kB
7. 51.507 8,830.457 ↓ 2.2 517,093 1

Subquery Scan on s (cost=10,000,328,805.36..10,000,363,088.05 rows=236,432 width=13) (actual time=8,064.693..8,830.457 rows=517,093 loops=1)

8. 545.349 8,778.950 ↓ 2.2 517,093 1

GroupAggregate (cost=10,000,328,805.36..10,000,360,723.73 rows=236,432 width=48) (actual time=8,064.691..8,778.950 rows=517,093 loops=1)

  • Group Key: trips_with_zones_mt."TRIP_ID", trips_with_zones_mt."BOARDING
9. 7,728.968 8,233.601 ↑ 1.0 2,364,324 1

Sort (cost=10,000,328,805.36..10,000,334,716.17 rows=2,364,324 width=46) (actual time=8,064.660..8,233.601 rows=2,364,324 loops=1)

  • Sort Key: trips_with_zones_mt."TRIP_ID", trips_with_zones_mt."BOARDING
  • Sort Method: quicksort Memory: 301580kB
10. 504.633 504.633 ↑ 1.0 2,364,324 1

Seq Scan on trips_with_zones_mt (cost=10,000,000,000.00..10,000,078,506.24 rows=2,364,324 width=46) (actual time=0.009..504.633 rows=2,364,324 loops=1)