explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AL8a

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

Limit (cost=275,080.12..315,319.93 rows=10,000 width=83) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=275,080.12..1,989,078.61 rows=425,946 width=83) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=275,079.98..1,919,861.82 rows=425,946 width=82) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=275,079.55..1,702,514.68 rows=425,946 width=55) (actual rows= loops=)

  • Filter: ((op.operation_type <> 'UNKNOWN_RPI_REGISTRATION'::text) OR (s.route_id IS NOT NULL))
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=275,079.13..1,506,797.19 rows=427,484 width=51) (actual rows= loops=)

  • Hash Cond: (op.linked_item_barcode = c.barcode)
  • Filter: ((c.barcode IS NULL) OR (op.operation_type = 'RPI_IS_SENT'::text))
6. 0.000 0.000 ↓ 0.0

Seq Scan on rpi_operation op (cost=0.00..1,048,641.45 rows=9,090,251 width=68) (actual rows= loops=)

  • Filter: (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[]))
7. 0.000 0.000 ↓ 0.0

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

8. 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)
9. 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)
10. 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)
11. 0.000 0.000 ↓ 0.0

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

12. 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)
13. 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)
14. 0.000 0.000 ↓ 0.0

Index Scan using session_pkey on session s (cost=0.42..0.45 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (op.session_id = id)
15. 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)
16. 0.000 0.000 ↓ 0.0

Index Scan using sc_site_pkey on sc_site st (cost=0.14..0.15 rows=1 width=9) (actual rows= loops=)

  • Index Cond: (id = op.sc_site_id)