explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mSAM : Optimization for: plan #JcJK

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1,624.734 7,464.580 ↓ 1.9 30 1

HashAggregate (cost=377,385.85..377,386.73 rows=16 width=188) (actual time=7,464.515..7,464.580 rows=30 loops=1)

  • Group Key: e0_.id
2. 2,166.077 5,839.846 ↓ 2.4 1,396,724 1

Hash Join (cost=17,184.51..338,084.31 rows=582,245 width=54) (actual time=117.936..5,839.846 rows=1,396,724 loops=1)

  • Hash Cond: (e1_.meta_flight_fk = e5_.id)
3. 2,428.536 3,558.000 ↓ 1.9 6,094,230 1

Hash Join (cost=6.42..235,212.11 rows=3,152,445 width=58) (actual time=0.170..3,558.000 rows=6,094,230 loops=1)

  • Hash Cond: (e1_.best_practice_fk = e0_.id)
4. 1,129.330 1,129.330 ↑ 1.0 6,284,249 1

Seq Scan on meta_flight_bp_values e1_ (cost=0.00..180,037.90 rows=6,304,890 width=58) (actual time=0.024..1,129.330 rows=6,284,249 loops=1)

5. 0.008 0.134 ↓ 1.9 30 1

Hash (cost=6.22..6.22 rows=16 width=4) (actual time=0.134..0.134 rows=30 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
6. 0.013 0.126 ↓ 1.9 30 1

Hash Join (cost=4.51..6.22 rows=16 width=4) (actual time=0.104..0.126 rows=30 loops=1)

  • Hash Cond: (b4_.domain_fk = p3_.id)
7. 0.025 0.095 ↓ 1.9 30 1

Hash Join (cost=3.35..4.97 rows=16 width=8) (actual time=0.078..0.095 rows=30 loops=1)

  • Hash Cond: (b4_.bp_fk = e0_.bp_definition_fk)
8. 0.011 0.011 ↑ 1.0 34 1

Seq Scan on bp_domain_link b4_ (cost=0.00..1.34 rows=34 width=8) (actual time=0.008..0.011 rows=34 loops=1)

9. 0.006 0.059 ↓ 1.9 30 1

Hash (cost=3.15..3.15 rows=16 width=12) (actual time=0.059..0.059 rows=30 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
10. 0.021 0.053 ↓ 1.9 30 1

Hash Join (cost=1.52..3.15 rows=16 width=12) (actual time=0.039..0.053 rows=30 loops=1)

  • Hash Cond: (p2_.id = e0_.bp_definition_fk)
11. 0.011 0.011 ↑ 1.0 34 1

Seq Scan on bp_definition p2_ (cost=0.00..1.34 rows=34 width=4) (actual time=0.007..0.011 rows=34 loops=1)

12. 0.008 0.021 ↓ 1.9 30 1

Hash (cost=1.32..1.32 rows=16 width=8) (actual time=0.021..0.021 rows=30 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
13. 0.013 0.013 ↓ 1.9 30 1

Seq Scan on best_practice e0_ (cost=0.00..1.32 rows=16 width=8) (actual time=0.009..0.013 rows=30 loops=1)

  • Filter: is_visible_for_airline
  • Rows Removed by Filter: 2
14. 0.009 0.018 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=4) (actual time=0.018..0.018 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.009 0.009 ↑ 1.0 7 1

Seq Scan on domain p3_ (cost=0.00..1.07 rows=7 width=4) (actual time=0.008..0.009 rows=7 loops=1)

16. 17.422 115.769 ↑ 1.0 81,187 1

Hash (cost=15,835.28..15,835.28 rows=81,824 width=4) (actual time=115.769..115.769 rows=81,187 loops=1)

  • Buckets: 131072 Batches: 2 Memory Usage: 2452kB
17. 98.347 98.347 ↑ 1.0 81,187 1

Seq Scan on meta_flight e5_ (cost=0.00..15,835.28 rows=81,824 width=4) (actual time=0.081..98.347 rows=81,187 loops=1)

  • Filter: ((dep_date >= '2019-02-01 00:00:00'::timestamp without time zone) AND (dep_date <= '2020-01-21 23:59:59.999999'::timestamp without time zone))
  • Rows Removed by Filter: 361784