explain.depesz.com

PostgreSQL's explain analyze made readable

Result: swNR : query

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

GroupAggregate (cost=2,456.55..2,457.65 rows=40 width=73) (actual rows= loops=)

  • Group Key: (min(serv_enabled_history.seh_enable_dt)), serv_enabled_history.seh_stcd, state_mast.stm_state_name, (btrim((serv_enabled_history.seh_rtocode)::text)), ola_mast.om_officename
2. 0.000 0.000 ↓ 0.0

Sort (cost=2,456.55..2,456.65 rows=40 width=69) (actual rows= loops=)

  • Sort Key: (min(serv_enabled_history.seh_enable_dt)) DESC, state_mast.stm_state_name, ola_mast.om_officename
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=334.31..2,455.49 rows=40 width=69) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Seq Scan on ola_mast (cost=0.00..311.42 rows=10 width=26) (actual rows= loops=)

  • Filter: (btrim((om_officecd)::text) = 'BR09'::text)
5. 0.000 0.000 ↓ 0.0

Materialize (cost=334.31..2,143.58 rows=4 width=49) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Append (cost=334.31..2,143.56 rows=4 width=49) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=334.31..334.32 rows=1 width=49) (actual rows= loops=)

  • Sort Key: (min(serv_enabled_history.seh_enable_dt))
8. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=334.20..334.30 rows=1 width=49) (actual rows= loops=)

  • Group Key: serv_enabled_history.seh_stcd, state_mast.stm_state_name, (btrim((serv_enabled_history.seh_rtocode)::text))
9. 0.000 0.000 ↓ 0.0

Sort (cost=334.20..334.22 rows=7 width=49) (actual rows= loops=)

  • Sort Key: state_mast.stm_state_name
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..334.10 rows=7 width=49) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..12.46 rows=1 width=23) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Scan using indx_serv_enabled_history_seh_stcd on serv_enabled_history (cost=0.29..9.97 rows=1 width=13) (actual rows= loops=)

  • Index Cond: (seh_stcd = 'BR'::bpchar)
  • Filter: ((seh_camp_id = '0'::numeric) AND (btrim((seh_rtocode)::text) = 'BR09'::text))
13. 0.000 0.000 ↓ 0.0

Seq Scan on state_mast (cost=0.00..2.48 rows=1 width=13) (actual rows= loops=)

  • Filter: (stm_state_cd = 'BR'::bpchar)
14. 0.000 0.000 ↓ 0.0

Seq Scan on ola_mast ola_mast_1 (cost=0.00..321.54 rows=7 width=6) (actual rows= loops=)

  • Filter: (((om_off_type)::text = ANY ('{R,U}'::text[])) AND ((om_postaladd4)::text = ANY ('{N,O}'::text[])) AND (btrim((om_officecd)::text) = 'BR09'::text))
15. 0.000 0.000 ↓ 0.0

Sort (cost=1,809.17..1,809.18 rows=3 width=49) (actual rows= loops=)

  • Sort Key: (min(serv_enabled.se_enable_dt))
16. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,808.84..1,809.15 rows=3 width=49) (actual rows= loops=)

  • Group Key: serv_enabled.se_stcd, state_mast_1.stm_state_name, (btrim((serv_enabled.se_rtocode)::text))
17. 0.000 0.000 ↓ 0.0

Sort (cost=1,808.84..1,808.89 rows=21 width=49) (actual rows= loops=)

  • Sort Key: state_mast_1.stm_state_name
18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..1,808.38 rows=21 width=49) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on ola_mast ola_mast_2 (cost=0.00..321.54 rows=7 width=6) (actual rows= loops=)

  • Filter: (((om_off_type)::text = ANY ('{R,U}'::text[])) AND ((om_postaladd4)::text = ANY ('{N,O}'::text[])) AND (btrim((om_officecd)::text) = 'BR09'::text))
20. 0.000 0.000 ↓ 0.0

Materialize (cost=0.42..1,486.48 rows=3 width=23) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..1,486.46 rows=3 width=23) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on state_mast state_mast_1 (cost=0.00..2.48 rows=1 width=13) (actual rows= loops=)

  • Filter: (stm_state_cd = 'BR'::bpchar)
23. 0.000 0.000 ↓ 0.0

Index Scan using idx_serv_enabled_se_stcd on serv_enabled (cost=0.42..1,483.96 rows=3 width=13) (actual rows= loops=)

  • Index Cond: (se_stcd = 'BR'::bpchar)
  • Filter: ((se_camp_id = '0'::numeric) AND (btrim((se_rtocode)::text) = 'BR09'::text))