explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BdDBj

Settings
# exclusive inclusive rows x rows loops node
1. 0.220 6.573 ↓ 1.8 9 1

Merge Join (cost=115.66..1,824.55 rows=5 width=212) (actual time=2.620..6.573 rows=9 loops=1)

  • Output: '2020-07-31 13:00:00'::timestamp without time zone, 1, 4, NULL::text, cc.related_org_id, client_org.name, client_org.tems_customer_number, cust.id, cust.gl_legal_entity, cust.gl_cust_no, cust.name, 1, el.id, el.org_id, org.name, el.device_id, el.device_sn, el.event_execution_dtt, el.dataset_name, el.dataset_version, el.create_dtt
  • Inner Unique: true
  • Merge Cond: (client_org.bill_to_customer_id = cust.id)
  • Buffers: shared hit=682
2. 0.025 5.955 ↓ 1.8 9 1

Nested Loop (cost=115.25..4,245.92 rows=5 width=117) (actual time=2.039..5.955 rows=9 loops=1)

  • Output: el.id, el.org_id, el.device_id, el.device_sn, el.event_execution_dtt, el.dataset_name, el.dataset_version, el.create_dtt, org.name, cc.related_org_id, client_org.name, client_org.tems_customer_number, client_org.bill_to_customer_id
  • Inner Unique: true
  • Buffers: shared hit=641
3. 0.269 5.903 ↓ 4.5 9 1

Nested Loop (cost=115.11..4,245.52 rows=2 width=109) (actual time=2.021..5.903 rows=9 loops=1)

  • Output: el.id, el.org_id, el.device_id, el.device_sn, el.event_execution_dtt, el.dataset_name, el.dataset_version, el.create_dtt, cc.related_org_id, cc.org_id, client_org.name, client_org.tems_customer_number, client_org.bill_to_customer_id
  • Join Filter: (cc.org_id = el.org_id)
  • Rows Removed by Join Filter: 549
  • Buffers: shared hit=623
4. 1.256 2.658 ↓ 62.0 62 1

Nested Loop (cost=8.81..28.01 rows=1 width=35) (actual time=0.358..2.658 rows=62 loops=1)

  • Output: cc.related_org_id, cc.org_id, client_org.name, client_org.tems_customer_number, client_org.bill_to_customer_id
  • Join Filter: (cc.related_org_id = client_org.id)
  • Rows Removed by Join Filter: 3,782
  • Buffers: shared hit=3
5. 0.038 0.038 ↑ 1.0 62 1

Index Scan using organization_ak1 on users.organization client_org (cost=0.14..13.07 rows=62 width=31) (actual time=0.007..0.038 rows=62 loops=1)

  • Output: client_org.id, client_org.name, client_org.parent_id, client_org.enabled, client_org.location_id, client_org.tems_customer_number, client_org.bill_to_customer_id, client_org.exclusivity, client_org.hsm_slot, client_org.agreement_accepted_ts, client_org.heart_beat_period, client_org.monitor_my_terminals, client_org.idp_version, client_org.sales_director_name, client_org.sales_director_email, client_org.sales_admin_name, client_org.sales_admin_email
  • Buffers: shared hit=2
6. 0.691 1.364 ↓ 62.0 62 62

Materialize (cost=8.67..14.01 rows=1 width=8) (actual time=0.004..0.022 rows=62 loops=62)

  • Output: cc.related_org_id, cc.org_id
  • Buffers: shared hit=1
7. 0.051 0.673 ↓ 62.0 62 1

Subquery Scan on cc (cost=8.67..14.00 rows=1 width=8) (actual time=0.243..0.673 rows=62 loops=1)

  • Output: cc.related_org_id, cc.org_id
  • Filter: (cc.rr = 1)
  • Rows Removed by Filter: 102
  • Buffers: shared hit=1
8. 0.362 0.622 ↑ 1.0 164 1

WindowAgg (cost=8.67..11.95 rows=164 width=20) (actual time=0.242..0.622 rows=164 loops=1)

  • Output: mv_org_tree.org_id, mv_org_tree.related_org_id, rank() OVER (?), mv_org_tree.distance
  • Buffers: shared hit=1
9. 0.169 0.260 ↑ 1.0 164 1

Sort (cost=8.67..9.08 rows=164 width=12) (actual time=0.234..0.260 rows=164 loops=1)

  • Output: mv_org_tree.org_id, mv_org_tree.distance, mv_org_tree.related_org_id
  • Sort Key: mv_org_tree.org_id, mv_org_tree.distance
  • Sort Method: quicksort Memory: 32kB
  • Buffers: shared hit=1
10. 0.091 0.091 ↑ 1.0 164 1

Seq Scan on users.mv_org_tree (cost=0.00..2.64 rows=164 width=12) (actual time=0.009..0.091 rows=164 loops=1)

  • Output: mv_org_tree.org_id, mv_org_tree.distance, mv_org_tree.related_org_id
  • Buffers: shared hit=1
11. 1.736 2.976 ↑ 34.1 9 62

Bitmap Heap Scan on mgmtplan.event_log el (cost=106.29..4,213.68 rows=307 width=74) (actual time=0.024..0.048 rows=9 loops=62)

  • Output: el.id, el.org_id, el.device_id, el.device_sn, el.event_execution_dtt, el.result, el.dataset_name, el.dataset_type, el.dataset_version, el.addl_error_info, el.dataset_create_dtt, el.action_type, el.management_action_id, el.device_history_id, el.device_history_dtt, el.device_history_device_event_type, el.device_history_org_id, el.device_history_device_id2, el.device_history_serial_number, el.device_history_cpu_id, el.device_history_lane_id, el.device_history_device_state_id, el.device_history_type_id, el.device_history_store_id, el.device_history_timezone, el.device_history_timezone_source, el.device_history_online, el.device_history_store_name, el.device_history_org_name, el.device_history_user_scd_id, el.device_history_login_id, el.device_history_first_name, el.device_history_last_name, el.create_dtt
  • Recheck Cond: (((el.dataset_type)::text = 'SWPK'::text) AND (el.create_dtt >= '2020-04-01 00:00:00'::timestamp without time zone) AND (el.create_dtt < '2020-08-01 00:00:00'::timestamp without time zone))
  • Filter: (((el.result)::text = 'SUCC'::text) AND ((el.action_type)::text = 'DWNL'::text))
  • Rows Removed by Filter: 16
  • Heap Blocks: exact=310
  • Buffers: shared hit=620
12. 1.240 1.240 ↑ 95.4 25 62

Bitmap Index Scan on ix_event_log_02 (cost=0.00..106.22 rows=2,384 width=0) (actual time=0.020..0.020 rows=25 loops=62)

  • Index Cond: (((el.dataset_type)::text = 'SWPK'::text) AND (el.create_dtt >= '2020-04-01 00:00:00'::timestamp without time zone) AND (el.create_dtt < '2020-08-01 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=310
13. 0.027 0.027 ↑ 1.0 1 9

Index Scan using organization_pk on users.organization org (cost=0.14..0.20 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=9)

  • Output: org.id, org.name, org.parent_id, org.enabled, org.location_id, org.tems_customer_number, org.bill_to_customer_id, org.exclusivity, org.hsm_slot, org.agreement_accepted_ts, org.heart_beat_period, org.monitor_my_terminals, org.idp_version, org.sales_director_name, org.sales_director_email, org.sales_admin_name, org.sales_admin_email
  • Index Cond: (org.id = el.org_id)
  • Buffers: shared hit=18
14. 0.398 0.398 ↑ 1.2 688 1

Index Scan using customer_pkey on users.customer cust (cost=0.28..54.98 rows=809 width=51) (actual time=0.013..0.398 rows=688 loops=1)

  • Output: cust.id, cust.gl_legal_entity, cust.gl_cust_no, cust.name, cust.address, cust.address_2, cust.city, cust.postal_code, cust.blocked, cust.sim_auto_activation, cust.sim_activate_graceperiod_days, cust.sim_suspend_requests, cust.sim_suspend_days_max, cust.sim_guaranteed_cycle_max, cust.single_multi_src_invoice_ind, cust.create_dtt, cust.last_upd_dtt, cust.payment_terms_code
  • Buffers: shared hit=41