explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YVLW

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,442,153.79..2,002,920.16 rows=469,105 width=83) (actual rows= loops=)

  • Hash Cond: (op.sc_site_id = st.id)
2.          

CTE sent_items_group_list

3. 0.000 0.000 ↓ 0.0

Hash Join (cost=54,699.53..274,647.68 rows=34,516 width=17) (actual rows= loops=)

  • Hash Cond: (op_1.container_id = c.id)
4. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on container_operation op_1 (cost=17,550.10..234,881.12 rows=607,682 width=8) (actual rows= loops=)

  • Recheck Cond: (operation_type = 'CONTAINER_IS_SENT'::text)
5. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_container_operation_type (cost=0.00..17,398.17 rows=607,682 width=0) (actual rows= loops=)

  • Index Cond: (operation_type = 'CONTAINER_IS_SENT'::text)
6. 0.000 0.000 ↓ 0.0

Hash (cost=36,178.06..36,178.06 rows=77,710 width=25) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on session_container c (cost=1,462.68..36,178.06 rows=77,710 width=25) (actual rows= loops=)

  • Recheck Cond: (container_type_id = 5)
8. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_session_container_container_type_id (cost=0.00..1,443.25 rows=77,710 width=0) (actual rows= loops=)

  • Index Cond: (container_type_id = 5)
9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,167,504.84..1,722,270.39 rows=469,105 width=82) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,167,504.41..1,482,900.54 rows=469,105 width=55) (actual rows= loops=)

  • Hash Cond: (op.session_id = s.id)
  • Filter: ((op.operation_type <> 'UNKNOWN_RPI_REGISTRATION'::text) OR (s.route_id IS NOT NULL))
11. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=1,146,161.69..1,459,136.62 rows=470,798 width=51) (actual rows= loops=)

  • Hash Cond: (sent_items_group_list.sent_items_group_barcode = op.linked_item_barcode)
  • Filter: ((sent_items_group_list.sent_items_group_barcode IS NULL) OR (op.operation_type = 'RPI_IS_SENT'::text))
12. 0.000 0.000 ↓ 0.0

CTE Scan on sent_items_group_list (cost=0.00..690.32 rows=34,516 width=32) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash (cost=926,006.55..926,006.55 rows=9,090,251 width=68) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on rpi_operation op (cost=215,600.76..926,006.55 rows=9,090,251 width=68) (actual rows= loops=)

  • Recheck Cond: (operation_type = ANY ('{CONTAINER_RECEIVING,RPO_REGISTRATION,UNKNOWN_RPI_REGISTRATION,RPI_REGISTRATION_WITH_NEW_BARCODE,RPO_RETURN_OPERATION,RPO_RETURN_SAB_OPERATION,RPI_IS_RETURNED_AFTER_SENT,CONTAINER_IS_RETURNED_AFTER_SENT,OPENING,CONTAINER_EXTRACT_FROM_CONTAINER,RPI_EXTRACT_FROM_CONTAINER,ASSIGNMENT_TO_VESSEL,ASSIGNMENT_RPO_TO_CONTAINER,CONTAINER_FORMING,CONTAINER_IS_SENT,CONTAINER_SIMPLE_OPENING,CONTAINER_REFORMING,CONTAINER_TERMINATION,REGULAR_CONTAINER_REFORMING,RPI_IS_SENT}'::text[]))
15. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_rpi_operation_type (cost=0.00..213,328.20 rows=9,090,251 width=0) (actual rows= loops=)

  • Index Cond: (operation_type = ANY ('{CONTAINER_RECEIVING,RPO_REGISTRATION,UNKNOWN_RPI_REGISTRATION,RPI_REGISTRATION_WITH_NEW_BARCODE,RPO_RETURN_OPERATION,RPO_RETURN_SAB_OPERATION,RPI_IS_RETURNED_AFTER_SENT,CONTAINER_IS_RETURNED_AFTER_SENT,OPENING,CONTAINER_EXTRACT_FROM_CONTAINER,RPI_EXTRACT_FROM_CONTAINER,ASSIGNMENT_TO_VESSEL,ASSIGNMENT_RPO_TO_CONTAINER,CONTAINER_FORMING,CONTAINER_IS_SENT,CONTAINER_SIMPLE_OPENING,CONTAINER_REFORMING,CONTAINER_TERMINATION,REGULAR_CONTAINER_REFORMING,RPI_IS_SENT}'::text[]))
16. 0.000 0.000 ↓ 0.0

Hash (cost=15,510.10..15,510.10 rows=466,610 width=20) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on session s (cost=0.00..15,510.10 rows=466,610 width=20) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Scan using session_rpi_pkey on session_rpi r (cost=0.43..0.50 rows=1 width=35) (actual rows= loops=)

  • Index Cond: (id = op.rpi_id)
19. 0.000 0.000 ↓ 0.0

Hash (cost=1.12..1.12 rows=12 width=9) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on sc_site st (cost=0.00..1.12 rows=12 width=9) (actual rows= loops=)