explain.depesz.com

PostgreSQL's explain analyze made readable

Result: m7bG

Settings
# exclusive inclusive rows x rows loops node
1. 1.621 680.287 ↓ 0.0 0 1

Nested Loop (cost=361,365.98..2,599,519.43 rows=625,044 width=61) (actual time=680.287..680.287 rows=0 loops=1)

2. 7.960 656.961 ↑ 119.4 7,235 1

Hash Join (cost=361,365.41..1,654,993.63 rows=863,956 width=61) (actual time=636.041..656.961 rows=7,235 loops=1)

  • Hash Cond: (card_latenesses.phase_id = phases.id)
3. 20.835 20.835 ↑ 569.2 18,513 1

Index Scan using idx_card_latenesses_should_late_at_card_id_phase_id on card_latenesses (cost=0.57..1,265,966.47 rows=10,538,025 width=61) (actual time=0.052..20.835 rows=18,513 loops=1)

  • Index Cond: (should_late_at <= now())
4. 327.128 628.166 ↓ 1.6 1,085,663 1

Hash (cost=353,025.23..353,025.23 rows=667,169 width=4) (actual time=628.166..628.166 rows=1,085,663 loops=1)

  • Buckets: 2,097,152 (originally 1048576) Batches: 1 (originally 1) Memory Usage: 54,552kB
5. 23.037 301.038 ↓ 1.6 1,085,663 1

Gather (cost=1,000.00..353,025.23 rows=667,169 width=4) (actual time=0.305..301.038 rows=1,085,663 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
6. 278.001 278.001 ↓ 1.4 155,095 7 / 7

Parallel Seq Scan on phases (cost=0.00..285,308.33 rows=111,195 width=4) (actual time=0.014..278.001 rows=155,095 loops=7)

  • Filter: ((deleted_at IS NULL) AND (done IS NOT TRUE) AND (lateness_time > 0) AND (index > '0'::numeric))
  • Rows Removed by Filter: 1,007,439
7. 21.705 21.705 ↓ 0.0 0 7,235

Index Scan using cards_pkey on cards (cost=0.57..1.09 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=7,235)

  • Index Cond: (id = card_latenesses.card_id)
  • Filter: (deleted_at IS NULL)
  • Rows Removed by Filter: 1
Planning time : 0.592 ms
Execution time : 685.149 ms