explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WRVt

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 1.083 ↓ 0.0 0 1

Nested Loop Anti Join (cost=0.00..1,046.68 rows=1 width=24) (actual time=1.083..1.083 rows=0 loops=1)

  • Join Filter: (((bp.contract_transaction_id = ct.contract_transaction_id) OR (bp.contract_transaction_id IS NULL)) AND ((bp.rule_id = r.rule_id) OR (bp.rule_id IS NULL)))
2. 0.000 1.082 ↓ 0.0 0 1

Nested Loop (cost=0.00..1,044.66 rows=1 width=28) (actual time=1.082..1.082 rows=0 loops=1)

  • Join Filter: ((m.agent_id = (-1)) OR (m.agent_id = ct.contract_agent_id))
3. 0.044 1.082 ↓ 0.0 0 1

Nested Loop (cost=0.00..1,044.34 rows=1 width=24) (actual time=1.082..1.082 rows=0 loops=1)

4. 0.055 0.663 ↓ 25.0 25 1

Nested Loop (cost=0.00..1,040.01 rows=1 width=47) (actual time=0.100..0.663 rows=25 loops=1)

  • Join Filter: (((r.applicable_record_type)::text ~~ (('%'::text || (ct.record_type_id)::text) || '%'::text)) OR (r.applicable_record_type IS NULL))
5. 0.053 0.508 ↓ 6.2 25 1

Nested Loop (cost=0.00..1,038.67 rows=4 width=41) (actual time=0.076..0.508 rows=25 loops=1)

6. 0.030 0.030 ↑ 35.0 25 1

Seq Scan on tmp_transaction_validation r_trans (cost=0.00..38.60 rows=876 width=20) (actual time=0.020..0.030 rows=25 loops=1)

  • Filter: (contract_sequence <> '-1'::bpchar)
7. 0.425 0.425 ↑ 1.0 1 25

Index Scan using ix_contract_transaction_contract_seq on contract_transaction ct (cost=0.00..1.11 rows=1 width=30) (actual time=0.017..0.017 rows=1 loops=25)

  • Index Cond: ((contract_number = r_trans.contract_number) AND (transaction_sequence = r_trans.contract_sequence))
8. 0.100 0.100 ↑ 1.0 1 25

Index Scan using pk_validation_rule on validation_rule r (cost=0.00..0.29 rows=1 width=10) (actual time=0.003..0.004 rows=1 loops=25)

  • Index Cond: (rule_id = 1001)
9. 0.375 0.375 ↓ 0.0 0 25

Index Scan using eval_sg_con_m1_pkey on sg_con_m1 m1 (cost=0.00..4.30 rows=1 width=13) (actual time=0.015..0.015 rows=0 loops=25)

  • Index Cond: (sg_con_contract = r_trans.contract_number)
  • Filter: (upper((sg_con_status)::text) <> ALL ('{P,A,C,X}'::text[]))
10. 0.000 0.000 ↓ 0.0 0

Index Scan using ixfk_validation_rule_agent_mapping_validation_rule on validation_rule_agent_mapping m (cost=0.00..0.29 rows=1 width=12) (never executed)

  • Index Cond: (rule_id = 1001)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using ixfk_error_queue_bypass_agent on error_queue_bypass bp (cost=0.00..0.29 rows=1 width=16) (never executed)

  • Index Cond: (contract_agent_id = ct.contract_agent_id)
  • Filter: bypass_flag
12.          

SubPlan (for Nested Loop Anti Join)

13. 0.000 0.000 ↓ 0.0 0

Limit (cost=1.39..1.39 rows=1 width=6) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.39..1.39 rows=1 width=6) (never executed)

  • Sort Key: dep_map.priority
15. 0.000 0.000 ↓ 0.0 0

Seq Scan on department_agent_resolution_owner_mapping dep_map (cost=0.00..1.38 rows=1 width=6) (never executed)

  • Filter: ((resolution_department_id = r.resolution_department_id) AND ((agent_id = (-1)) OR (agent_id = ct.contract_agent_id)))
Total runtime : 1.432 ms