explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gfqy

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 2,444.491 ↑ 1.0 20 1

Limit (cost=201,033.39..201,033.44 rows=20 width=202) (actual time=2,444.484..2,444.491 rows=20 loops=1)

2. 0.034 2,444.485 ↑ 27.2 20 1

Sort (cost=201,033.39..201,034.75 rows=544 width=202) (actual time=2,444.483..2,444.485 rows=20 loops=1)

  • Sort Key: (sum(e0_.rcs)) DESC
  • Sort Method: quicksort Memory: 29kB
3. 699.480 2,444.451 ↑ 18.1 30 1

HashAggregate (cost=201,013.47..201,018.91 rows=544 width=202) (actual time=2,444.437..2,444.451 rows=30 loops=1)

  • Group Key: e2_.id, p1_.id
4. 586.634 1,744.971 ↓ 2.0 1,396,724 1

Hash Join (cost=36,289.16..186,869.67 rows=707,190 width=202) (actual time=220.702..1,744.971 rows=1,396,724 loops=1)

  • Hash Cond: (e0_.best_practice_fk = e2_.id)
5. 943.243 1,158.282 ↓ 1.0 1,435,607 1

Bitmap Heap Scan on meta_flight_bp_values e0_ (cost=36,285.82..174,490.50 rows=1,414,379 width=52) (actual time=220.639..1,158.282 rows=1,435,607 loops=1)

  • Recheck Cond: ((dep_date >= '2019-02-01 00:00:00'::timestamp without time zone) AND (dep_date <= '2020-01-21 23:59:59'::timestamp without time zone))
  • Rows Removed by Index Recheck: 1887468
  • Heap Blocks: exact=26188 lossy=53006
6. 215.039 215.039 ↓ 1.0 1,440,649 1

Bitmap Index Scan on meta_flight_bp_values_idx (cost=0.00..35,932.22 rows=1,414,379 width=0) (actual time=215.039..215.039 rows=1,440,649 loops=1)

  • Index Cond: ((dep_date >= '2019-02-01 00:00:00'::timestamp without time zone) AND (dep_date <= '2020-01-21 23:59:59'::timestamp without time zone))
7. 0.006 0.055 ↓ 1.9 30 1

Hash (cost=3.15..3.15 rows=16 width=154) (actual time=0.055..0.055 rows=30 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
8. 0.018 0.049 ↓ 1.9 30 1

Hash Join (cost=1.52..3.15 rows=16 width=154) (actual time=0.033..0.049 rows=30 loops=1)

  • Hash Cond: (p1_.id = e2_.bp_definition_fk)
9. 0.012 0.012 ↑ 1.0 34 1

Seq Scan on bp_definition p1_ (cost=0.00..1.34 rows=34 width=150) (actual time=0.009..0.012 rows=34 loops=1)

10. 0.001 0.019 ↓ 1.9 30 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
11. 0.018 0.018 ↓ 1.9 30 1

Seq Scan on best_practice e2_ (cost=0.00..1.32 rows=16 width=8) (actual time=0.007..0.018 rows=30 loops=1)

  • Filter: is_visible_for_airline
  • Rows Removed by Filter: 2
Planning time : 0.411 ms
Execution time : 2,444.569 ms