explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KcbK

Settings
# exclusive inclusive rows x rows loops node
1. 106.744 3,188.066 ↓ 2.0 2 1

Gather (cost=269,314.70..390,148.13 rows=1 width=16) (actual time=3,100.685..3,188.066 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • JIT:
  • Functions: 96
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 9.248 ms, Inlining 0.000 ms, Optimization 2.665 ms, Emission 52.497 ms, Total 64.410 ms
2. 194.852 3,081.322 ↑ 1.0 1 3 / 3

Parallel Hash Join (cost=268,314.70..389,148.03 rows=1 width=16) (actual time=3,048.987..3,081.322 rows=1 loops=3)

  • Hash Cond: (((trip_fare_25.medallion)::text = (trip_data_25.medallion)::text) AND ((trip_fare_25.hack_license)::text = (trip_data_25.hack_license)::text) AND ((trip_fare_25.vendor_id)::text = (trip_data_25.vendor_id)::text) AND (trip_fare_25.pickup_datetime = trip_data_25.pickup_datetime))
3. 366.509 2,101.410 ↑ 346,270.0 1 3 / 3

Hash Join (cost=130,050.77..217,409.26 rows=346,270 width=78) (actual time=1,989.377..2,101.410 rows=1 loops=3)

  • Hash Cond: ((date_trunc('month'::text, trip_fare_25.pickup_datetime) = (date_trunc('month'::text, trip_fare_25_1.pickup_datetime))) AND (trip_fare_25.total_amount = (max(trip_fare_25_1.total_amount))))
4. 118.026 118.026 ↑ 1.2 1,231,385 3 / 3

Parallel Seq Scan on trip_fare_25 (cost=0.00..79,085.12 rows=1,539,212 width=82) (actual time=0.032..118.026 rows=1,231,385 loops=3)

5. 0.005 1,616.875 ↑ 45,623.0 1 3 / 3

Hash (cost=129,366.43..129,366.43 rows=45,623 width=12) (actual time=1,616.874..1,616.875 rows=1 loops=3)

  • Buckets: 65,536 Batches: 1 Memory Usage: 513kB
6. 522.232 1,616.870 ↑ 45,623.0 1 3 / 3

HashAggregate (cost=128,339.91..128,910.20 rows=45,623 width=12) (actual time=1,616.746..1,616.870 rows=1 loops=3)

  • Group Key: date_trunc('month'::text, trip_fare_25_1.pickup_datetime)
7. 1,094.638 1,094.638 ↓ 1.0 3,694,154 3 / 3

Seq Scan on trip_fare_25 trip_fare_25_1 (cost=0.00..109,869.36 rows=3,694,109 width=12) (actual time=0.030..1,094.638 rows=3,694,154 loops=3)

8. 492.675 785.060 ↑ 1.2 1,231,385 3 / 3

Parallel Hash (cost=86,434.31..86,434.31 rows=1,539,231 width=86) (actual time=785.060..785.060 rows=1,231,385 loops=3)

  • Buckets: 32,768 Batches: 128 Memory Usage: 3,744kB
9. 292.385 292.385 ↑ 1.2 1,231,385 3 / 3

Parallel Seq Scan on trip_data_25 (cost=0.00..86,434.31 rows=1,539,231 width=86) (actual time=18.710..292.385 rows=1,231,385 loops=3)

Planning time : 1.427 ms
Execution time : 3,192.817 ms