explain.depesz.com

PostgreSQL's explain analyze made readable

Result: omUJ

Settings
# exclusive inclusive rows x rows loops node
1. 20.372 98,649.495 ↓ 62.8 41,754 1

Unique (cost=738,184.16..738,187.48 rows=665 width=531) (actual time=98,611.413..98,649.495 rows=41,754 loops=1)

2. 92.881 98,629.123 ↓ 62.8 41,754 1

Sort (cost=738,184.16..738,185.82 rows=665 width=531) (actual time=98,611.408..98,629.123 rows=41,754 loops=1)

  • Sort Key: rpi.id
  • Sort Method: quicksort Memory: 12420kB
3. 101.062 98,536.242 ↓ 62.8 41,754 1

Hash Left Join (cost=54.93..738,152.98 rows=665 width=531) (actual time=0.481..98,536.242 rows=41,754 loops=1)

  • Hash Cond: (rpi.id = reg.rpi_id)
  • Filter: (((rpi.rpi_type_id = 5) AND (ra.created_at > '2019-09-09 00:00:00+03'::timestamp with time zone) AND (ra.retired_at IS NULL) AND (ra.cell_seal_id IS NULL) AND (reg.rpi_id IS NULL) AND (sc.container_type_id > 0) AND (sc.to_post_index
  • Rows Removed by Filter: 15251
4. 90.090 98,434.767 ↑ 1.0 57,005 1

Nested Loop (cost=1.28..737,805.27 rows=58,743 width=563) (actual time=0.057..98,434.767 rows=57,005 loops=1)

5. 103.511 97,717.611 ↑ 1.0 57,006 1

Nested Loop (cost=0.86..701,714.25 rows=58,743 width=563) (actual time=0.046..97,717.611 rows=57,006 loops=1)

6. 125.928 93,467.908 ↑ 1.0 57,586 1

Nested Loop (cost=0.44..675,116.84 rows=58,743 width=563) (actual time=0.036..93,467.908 rows=57,586 loops=1)

7. 9,611.936 9,611.936 ↑ 1.0 57,586 1

Seq Scan on session_rpi rpi (cost=0.00..280,681.34 rows=58,743 width=531) (actual time=0.020..9,611.936 rows=57,586 loops=1)

  • Filter: (((rpi_type_id = 5) AND (import_post_index = ANY ('{420310,420311,420312,420313,420315,420316,420319}'::integer[]))) OR ((import_post_index IS NULL) AND (sender_post_index = ANY ('{420310,420311,420312,420313,
  • Rows Removed by Filter: 4971332
8. 83,730.044 83,730.044 ↑ 1.0 1 57,586

Index Scan using rpi_assignment_pkey on rpi_assignment ra (cost=0.44..6.70 rows=1 width=40) (actual time=1.454..1.454 rows=1 loops=57,586)

  • Index Cond: (id = rpi.assignment_id)
9. 4,146.192 4,146.192 ↑ 1.0 1 57,586

Index Scan using session_pkey on session ss (cost=0.42..0.44 rows=1 width=16) (actual time=0.071..0.072 rows=1 loops=57,586)

  • Index Cond: (id = ra.forming_session_id)
10. 627.066 627.066 ↑ 1.0 1 57,006

Index Scan using session_container_pkey on session_container sc (cost=0.42..0.60 rows=1 width=16) (actual time=0.010..0.011 rows=1 loops=57,006)

  • Index Cond: (id = ss.container_id)
11. 0.211 0.413 ↑ 1.3 575 1

Hash (cost=43.99..43.99 rows=772 width=8) (actual time=0.413..0.413 rows=575 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
12. 0.202 0.202 ↑ 1.3 575 1

Index Only Scan using uidx_sortmachine_item_register_machine_date_rpi on sortmachine_item_register reg (cost=0.29..43.99 rows=772 width=8) (actual time=0.017..0.202 rows=575 loops=1)

  • Index Cond: (machine_group_id = 3)
  • Heap Fetches: 0
Planning time : 6.402 ms
Execution time : 98,658.514 ms