explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HTFP

Settings
# exclusive inclusive rows x rows loops node
1. 0.052 186,302.577 ↑ 1.0 25 1

Limit (cost=1,003.81..36,192.12 rows=25 width=516) (actual time=186,207.959..186,302.577 rows=25 loops=1)

2. 65.766 186,302.525 ↑ 9,095.9 25 1

Gather Merge (cost=1,003.81..320,069,621.01 rows=227,397 width=516) (actual time=186,207.945..186,302.525 rows=25 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.103 186,236.759 ↑ 4,986.8 19 3 / 3

Nested Loop Left Join (cost=3.79..320,042,373.73 rows=94,749 width=516) (actual time=186,195.904..186,236.759 rows=19 loops=3)

4. 0.107 186,236.561 ↑ 4,986.8 19 3 / 3

Nested Loop Left Join (cost=3.51..319,841,742.72 rows=94,749 width=879) (actual time=186,195.815..186,236.561 rows=19 loops=3)

5. 0.102 186,236.340 ↑ 4,986.8 19 3 / 3

Nested Loop Left Join (cost=3.23..319,625,500.69 rows=94,749 width=783) (actual time=186,195.739..186,236.340 rows=19 loops=3)

6. 0.088 186,234.623 ↑ 4,986.8 19 3 / 3

Nested Loop Left Join (cost=2.95..319,408,875.63 rows=94,749 width=669) (actual time=186,194.738..186,234.623 rows=19 loops=3)

7. 0.079 186,231.875 ↑ 4,986.8 19 3 / 3

Nested Loop Left Join (cost=2.68..319,208,244.63 rows=94,749 width=485) (actual time=186,192.362..186,231.875 rows=19 loops=3)

8. 0.104 186,229.345 ↑ 4,986.8 19 3 / 3

Nested Loop Left Join (cost=2.40..318,992,002.59 rows=94,749 width=389) (actual time=186,190.323..186,229.345 rows=19 loops=3)

9. 0.086 186,225.612 ↑ 4,986.8 19 3 / 3

Nested Loop Left Join (cost=2.12..318,775,377.54 rows=94,749 width=275) (actual time=186,188.080..186,225.612 rows=19 loops=3)

10. 0.102 186,212.226 ↑ 4,986.8 19 3 / 3

Nested Loop Left Join (cost=1.55..318,524,709.17 rows=94,749 width=244) (actual time=186,187.065..186,212.226 rows=19 loops=3)

11. 6.223 186,200.116 ↑ 4,986.8 19 3 / 3

Nested Loop (cost=0.99..318,274,040.81 rows=94,749 width=220) (actual time=186,179.055..186,200.116 rows=19 loops=3)

12. 186,160.983 186,160.983 ↑ 1,590.8 10,970 3 / 3

Parallel Index Scan using xxtx_nm_accounting_v_id_idx on xxtx_nm_accounting_v a (cost=0.57..274,715,454.90 rows=17,450,868 width=168) (actual time=186,122.530..186,160.983 rows=10,970 loops=3)

  • Filter: ((first_rev <= 25,770) AND (last_rev > 25770) AND ((segment2)::text !~~ '911071%'::text) AND ((segment2)::text !~~ '911072%'::text) AND ((segment2)::text !~~ '911073%'::text) AND ((segment2)::text !~~ '911074%'::text) AND ((segment2)::text !~~ '911077%'::text) AND ((segment2)::text !~~ '912071%'::text) AND ((segment2)::text !~~ '912072%'::text) AND ((segment2)::text !~~ '912073%'::text) AND ((segment2)::text !~~ '912074%'::text) AND ((segment2)::text !~~ '912077%'::text) AND ((corr_segment2)::text !~~ '911071%'::text) AND ((corr_segment2)::text !~~ '911072%'::text) AND ((corr_segment2)::text !~~ '911073%'::text) AND ((corr_segment2)::text !~~ '911074%'::text) AND ((corr_segment2)::text !~~ '911077%'::text) AND ((corr_segment2)::text !~~ '912071%'::text) AND ((corr_segment2)::text !~~ '912072%'::text) AND ((corr_segment2)::text !~~ '912073%'::text) AND ((corr_segment2)::text !~~ '912074%'::text) AND ((corr_segment2)::text !~~ '912077%'::text) AND ((period)::text = ANY ('{"январь 2020","февраль 2020","март 2020"}'::text[])) AND ((filial)::text = ANY ('{01XXX,013XX,017XX,011XX,01000,01001,01004,015XX,012XX,016XX,014XX,01002,01200,01212,01113,01605,01002,01500,01606,01106,01700,01409,01205,01508,01701,01211,01313,01411,01302,01114,01003,01116,01400,01603,01405,01502,01501,01303,01308,01504,01102,01112,01706,01408,01307,01505,01403,01611,01607,01311,01402,01410,01111,01004,01300,01001,01705,01412,01101,01215,01507,01312,01204,01201,01704,01100,01404,01306,01304,01610,01000,01203,01309,01107,01703,01108,01109,01110,01702,01407,01310,01115,01608,01105,01600,01609,01708,01104,01305,01202}'::text[])))
  • Rows Removed by Filter: 65,319,559
13. 32.910 32.910 ↓ 0.0 0 32,910 / 3

Index Scan using ix_parties_party_id on xxtx_nm_parties_v p (cost=0.42..2.49 rows=1 width=65) (actual time=0.003..0.003 rows=0 loops=32,910)

  • Index Cond: (party_id = a.party_id)
  • Filter: ((inn)::text ~~ '77%'::text)
  • Rows Removed by Filter: 0
14. 12.008 12.008 ↑ 1.0 1 57 / 3

Index Scan using ix_documents_doc_type_doc_id on xxtx_nm_documents_v d (cost=0.56..2.64 rows=1 width=44) (actual time=0.632..0.632 rows=1 loops=57)

  • Index Cond: (((doc_type)::text = (a.doc_type)::text) AND (doc_id = a.doc_id))
  • Filter: ((first_rev <= 2,673,823) AND (last_rev > 2673823))
15. 13.300 13.300 ↑ 1.0 1 57 / 3

Index Scan using ix_documents_doc_type_doc_id on xxtx_nm_documents_v c (cost=0.56..2.64 rows=1 width=38) (actual time=0.699..0.700 rows=1 loops=57)

  • Index Cond: (((doc_type)::text = 'XXCN009_DOC_HEADERS'::text) AND (doc_id = a.contract_id))
  • Filter: ((first_rev <= 2,673,823) AND (last_rev > 2673823))
16. 3.629 3.629 ↑ 1.0 1 57 / 3

Index Scan using xxtx_nm_spr_s02_accounts_v_s_code_idx on xxtx_nm_spr_s02_accounts_v sa (cost=0.28..2.28 rows=1 width=125) (actual time=0.191..0.191 rows=1 loops=57)

  • Index Cond: ((s_code)::text = (a.segment2)::text)
17. 2.451 2.451 ↑ 1.0 1 57 / 3

Index Scan using xxtx_nm_spr_s03_items_v_s_code_idx on xxtx_nm_spr_s03_items_v si (cost=0.28..2.27 rows=1 width=104) (actual time=0.128..0.129 rows=1 loops=57)

  • Index Cond: ((s_code)::text = (a.segment3)::text)
18. 2.660 2.660 ↑ 1.0 1 57 / 3

Index Scan using xxtx_nm_spr_s04_tax_v_s_code_idx on xxtx_nm_spr_s04_tax_v st (cost=0.28..2.11 rows=1 width=190) (actual time=0.140..0.140 rows=1 loops=57)

  • Index Cond: ((s_code)::text = (a.segment4)::text)
19. 1.615 1.615 ↑ 1.0 1 57 / 3

Index Scan using xxtx_nm_spr_s02_accounts_v_s_code_idx on xxtx_nm_spr_s02_accounts_v csa (cost=0.28..2.28 rows=1 width=125) (actual time=0.085..0.085 rows=1 loops=57)

  • Index Cond: ((s_code)::text = (a.corr_segment2)::text)
20. 0.114 0.114 ↑ 1.0 1 57 / 3

Index Scan using xxtx_nm_spr_s03_items_v_s_code_idx on xxtx_nm_spr_s03_items_v csi (cost=0.28..2.27 rows=1 width=104) (actual time=0.006..0.006 rows=1 loops=57)

  • Index Cond: ((s_code)::text = (a.corr_segment3)::text)
21. 0.095 0.095 ↑ 1.0 1 57 / 3

Index Scan using xxtx_nm_spr_s04_tax_v_s_code_idx on xxtx_nm_spr_s04_tax_v cst (cost=0.28..2.11 rows=1 width=190) (actual time=0.005..0.005 rows=1 loops=57)

  • Index Cond: ((s_code)::text = (a.corr_segment4)::text)
Planning time : 18.960 ms
Execution time : 186,303.325 ms