explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BCxi

Settings
# exclusive inclusive rows x rows loops node
1. 0.055 49.640 ↑ 1.0 100 1

Limit (cost=1.72..28,783.47 rows=100 width=83) (actual time=0.118..49.640 rows=100 loops=1)

2. 0.404 49.585 ↑ 4,259.5 100 1

Nested Loop (cost=1.72..122,594,721.92 rows=425,946 width=83) (actual time=0.117..49.585 rows=100 loops=1)

  • Join Filter: (op.sc_site_id = st.id)
  • Rows Removed by Join Filter: 1091
3. 0.091 48.881 ↑ 4,259.5 100 1

Nested Loop (cost=1.72..122,518,050.49 rows=425,946 width=82) (actual time=0.090..48.881 rows=100 loops=1)

4. 0.071 48.090 ↑ 4,259.5 100 1

Nested Loop Left Join (cost=1.29..122,300,703.34 rows=425,946 width=55) (actual time=0.071..48.090 rows=100 loops=1)

  • Filter: ((op.operation_type <> 'UNKNOWN_RPI_REGISTRATION'::text) OR (s.route_id IS NOT NULL))
5. 0.083 47.919 ↑ 4,274.8 100 1

Nested Loop Left Join (cost=0.86..122,104,985.85 rows=427,484 width=51) (actual time=0.067..47.919 rows=100 loops=1)

  • Filter: ((c.barcode IS NULL) OR (op.operation_type = 'RPI_IS_SENT'::text))
6. 0.136 0.136 ↑ 90,902.5 100 1

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

  • 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[]))
  • Rows Removed by Filter: 61
7. 0.159 47.700 ↓ 0.0 0 100

Nested Loop (cost=0.86..13.30 rows=1 width=17) (actual time=0.476..0.477 rows=0 loops=100)

8. 47.400 47.400 ↓ 0.0 0 100

Index Scan using idx_session_container_barcode on session_container c (cost=0.43..0.47 rows=1 width=25) (actual time=0.474..0.474 rows=0 loops=100)

  • Index Cond: (barcode = op.linked_item_barcode)
  • Filter: (container_type_id = 5)
  • Rows Removed by Filter: 1
9. 0.141 0.141 ↑ 1.0 1 47

Index Scan using idx_container_operation_session_container_id on container_operation op_1 (cost=0.43..12.83 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=47)

  • Index Cond: (container_id = c.id)
  • Filter: (operation_type = 'CONTAINER_IS_SENT'::text)
  • Rows Removed by Filter: 2
10. 0.100 0.100 ↓ 0.0 0 100

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

  • Index Cond: (op.session_id = id)
11. 0.700 0.700 ↑ 1.0 1 100

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

  • Index Cond: (id = op.rpi_id)
12. 0.293 0.300 ↑ 1.0 12 100

Materialize (cost=0.00..1.18 rows=12 width=9) (actual time=0.000..0.003 rows=12 loops=100)

13. 0.007 0.007 ↑ 1.0 12 1

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