explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Pb2d

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

Group (cost=85,910,150.12..85,964,996.03 rows=8,437,832 width=448) (actual rows= loops=)

  • Group Key: so.loss_id, so.is_juridical, so.is_not_resident, so.perpetrator, so.last_name, so.first_name, so.middle_name, so.doc_serial, so.doc_number, so.doc_type_id, so.doc_rec_id, rso.subj_osago_rec_id
2. 0.000 0.000 ↓ 0.0

Sort (cost=85,910,150.12..85,914,369.03 rows=8,437,832 width=448) (actual rows= loops=)

  • Sort Key: so.loss_id, so.is_juridical, so.is_not_resident, so.perpetrator, so.last_name, so.first_name, so.middle_name, so.doc_serial, so.doc_number, so.doc_type_id, so.doc_rec_id, rso.subj_osago_rec_id
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=63,172,030.22..84,719,370.51 rows=8,437,832 width=448) (actual rows= loops=)

  • Filter: (((po.is_tech_cor = 0) AND (po.recall_policy_unq_id = 0) AND (po.ins_company_id <> 199)) OR ((rls.is_tech_cor = 0) AND (rls.recall_loss_rec_id = 0)) OR ((rls.is_tech_cor = 0) AND (rls_only.recall_loss_rec_id = 0)))
4. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=63,172,030.11..64,973,056.31 rows=9,116,710 width=476) (actual rows= loops=)

  • Hash Cond: (rls_only.glt_subj_osago_rec_id = rso.subj_osago_rec_id)
5. 0.000 0.000 ↓ 0.0

Seq Scan on loss rls_only (cost=0.00..994,460.58 rows=20,231,666 width=16) (actual rows= loops=)

  • Filter: ((is_tech_cor = 0) AND (recall_loss_rec_id = 0))
6. 0.000 0.000 ↓ 0.0

Hash (cost=62,588,132.62..62,588,132.62 rows=9,116,710 width=468) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=61,075,785.84..62,588,132.62 rows=9,116,710 width=468) (actual rows= loops=)

  • Hash Cond: (rls.glt_policy_subj_info_id = psi.policy_subj_info_id)
8. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on loss rls (cost=44,433.75..921,765.98 rows=6,351,057 width=20) (actual rows= loops=)

  • Recheck Cond: ((glt_subj_osago_rec_id IS NULL) AND (is_tech_cor = 0) AND (recall_loss_rec_id = 0))
9. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on loss_idx_cond (cost=0.00..44,116.20 rows=6,351,057 width=0) (actual rows= loops=)

  • Index Cond: (glt_subj_osago_rec_id IS NULL)
10. 0.000 0.000 ↓ 0.0

Hash (cost=60,456,357.60..60,456,357.60 rows=9,116,710 width=464) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=418,387.67..60,456,357.60 rows=9,116,710 width=464) (actual rows= loops=)

  • Hash Cond: (psi.subj_osago_rec_id = rso.subj_osago_rec_id)
12. 0.000 0.000 ↓ 0.0

Seq Scan on policy_subj_info psi (cost=0.00..58,199,487.64 rows=2,414,842,880 width=24) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash (cost=414,708.79..414,708.79 rows=1,051,108 width=448) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.11..414,708.79 rows=1,051,108 width=448) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on tmp_subject_osago_doc_tmp1 so (cost=0.00..964.60 rows=18,200 width=376) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Index Scan using idx_subject_osago_subj_osago_doc_rec_id on subject_osago rso (cost=0.11..22.56 rows=58 width=80) (actual rows= loops=)

  • Index Cond: (subj_osago_doc_rec_id = so.doc_rec_id)
17. 0.000 0.000 ↓ 0.0

Index Scan using pk_policy_osago on policy_osago po (cost=0.12..2.16 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (policy_rec_id = psi.policy_rec_id)
  • Filter: ((ins_company_id <> 199) AND (is_tech_cor = 0) AND (recall_policy_unq_id = 0))