explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VZqr

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 71.322 11,207.201 ↑ 1.0 1 1

Aggregate (cost=10,000,460,160.00..10,000,460,160.01 rows=1 width=32) (actual time=11,207.201..11,207.201 rows=1 loops=1)

2. 6.123 11,135.879 ↓ 19.9 13,355 1

Hash Join (cost=10,000,459,295.97..10,000,459,987.47 rows=670 width=93) (actual time=11,126.029..11,135.879 rows=13,355 loops=1)

  • Hash Cond: ((stop.durak_no)::text = s.boarding)
3. 3.751 3.751 ↑ 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.015..3.751 rows=14,438 loops=1)

4. 1.102 11,126.005 ↓ 17.8 3,561 1

Hash (cost=10,000,459,293.18..10,000,459,293.18 rows=200 width=45) (actual time=11,126.004..11,126.005 rows=3,561 loops=1)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 210kB
5. 93.091 11,124.903 ↓ 17.8 3,561 1

GroupAggregate (cost=10,000,456,924.36..10,000,459,291.18 rows=200 width=45) (actual time=10,975.406..11,124.903 rows=3,561 loops=1)

  • Group Key: s.boarding
6. 880.685 11,031.812 ↓ 2.2 517,093 1

Sort (cost=10,000,456,924.36..10,000,457,515.44 rows=236,432 width=13) (actual time=10,971.421..11,031.812 rows=517,093 loops=1)

  • Sort Key: s.boarding
  • Sort Method: quicksort Memory: 36527kB
7. 50.912 10,151.127 ↓ 2.2 517,093 1

Subquery Scan on s (cost=10,000,401,538.86..10,000,435,821.55 rows=236,432 width=13) (actual time=7,461.825..10,151.127 rows=517,093 loops=1)

8. 561.152 10,100.215 ↓ 2.2 517,093 1

GroupAggregate (cost=10,000,401,538.86..10,000,433,457.23 rows=236,432 width=48) (actual time=7,461.825..10,100.215 rows=517,093 loops=1)

  • Group Key: trips_with_zones_mt."TRIP_ID", trips_with_zones_mt."BOARDING
9. 9,031.086 9,539.063 ↑ 1.0 2,364,324 1

Sort (cost=10,000,401,538.86..10,000,407,449.67 rows=2,364,324 width=46) (actual time=7,461.765..9,539.063 rows=2,364,324 loops=1)

  • Sort Key: trips_with_zones_mt."TRIP_ID", trips_with_zones_mt."BOARDING
  • Sort Method: external merge Disk: 132592kB
10. 507.977 507.977 ↑ 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..507.977 rows=2,364,324 loops=1)