explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KxFk

Settings
# exclusive inclusive rows x rows loops node
1. 7,176.845 1,146,862.291 ↓ 1.0 369,392 1

Nested Loop Left Join (cost=262,910.52..54,887,412.12 rows=363,149 width=2,604) (actual time=7,028.419..1,146,862.291 rows=369,392 loops=1)

2. 778.355 460,924.166 ↓ 1.0 369,392 1

Hash Left Join (cost=262,909.96..4,683,897.60 rows=363,149 width=517) (actual time=7,017.074..460,924.166 rows=369,392 loops=1)

  • Hash Cond: ((e.concatenation)::text = (osp.concatenation)::text)
3. 790.374 460,129.077 ↓ 1.0 369,392 1

Nested Loop (cost=261,691.49..4,677,760.15 rows=363,149 width=438) (actual time=7,000.222..460,129.077 rows=369,392 loops=1)

4. 800.387 424,246.463 ↓ 1.0 369,392 1

Nested Loop (cost=261,691.05..3,892,116.79 rows=363,149 width=397) (actual time=6,999.629..424,246.463 rows=369,392 loops=1)

5. 4,986.476 247,615.484 ↓ 1.0 369,392 1

Hash Join (cost=261,690.49..3,047,822.63 rows=363,149 width=391) (actual time=6,998.452..247,615.484 rows=369,392 loops=1)

  • Hash Cond: (e.debtor_adr_id = adr.id)
6. 443.255 239,858.289 ↓ 1.0 369,392 1

Nested Loop (cost=89,962.17..2,795,231.94 rows=363,500 width=308) (actual time=3,963.600..239,858.289 rows=369,392 loops=1)

  • Join Filter: (e.decis_id = dio.decis_id)
7. 484.651 139,990.855 ↓ 1.1 409,153 1

Nested Loop (cost=89,961.61..1,358,020.26 rows=384,757 width=306) (actual time=3,960.927..139,990.855 rows=409,153 loops=1)

8. 26,725.394 30,671.506 ↓ 1.1 409,153 1

Bitmap Heap Scan on docs_executive e (cost=89,961.04..457,319.23 rows=384,757 width=295) (actual time=3,959.392..30,671.506 rows=409,153 loops=1)

  • Recheck Cond: ((dat_sost >= '2020-01-01 00:00:00'::timestamp without time zone) AND (dat_sost <= (('now'::cstring)::date - '1 day'::interval)) AND ((ogai_sost_kod)::text = '45597'::text))
  • Rows Removed by Index Recheck: 1,188,600
  • Heap Blocks: exact=55,891 lossy=384,983
9. 33.454 3,946.112 ↓ 0.0 0 1

BitmapAnd (cost=89,961.04..89,961.04 rows=384,757 width=0) (actual time=3,946.112..3,946.112 rows=0 loops=1)

10. 1,379.554 1,379.554 ↓ 1.1 885,984 1

Bitmap Index Scan on docs_executive_dat_sost (cost=0.00..16,842.43 rows=808,199 width=0) (actual time=1,379.554..1,379.554 rows=885,984 loops=1)

  • Index Cond: ((dat_sost >= '2020-01-01 00:00:00'::timestamp without time zone) AND (dat_sost <= (('now'::cstring)::date - '1 day'::interval)))
11. 2,533.104 2,533.104 ↓ 1.0 2,223,065 1

Bitmap Index Scan on docs_executive_status_id_kod (cost=0.00..72,925.98 rows=2,145,293 width=0) (actual time=2,533.104..2,533.104 rows=2,223,065 loops=1)

  • Index Cond: ((ogai_sost_kod)::text = '45597'::text)
12. 108,834.698 108,834.698 ↑ 1.0 1 409,153

Index Scan using decis_pkey on decis (cost=0.56..2.33 rows=1 width=11) (actual time=0.265..0.266 rows=1 loops=409,153)

  • Index Cond: (decis_id = e.decis_id)
13. 99,424.179 99,424.179 ↑ 5.0 1 409,153

Index Scan using di_decis_stad on decis_ispoln dio (cost=0.56..3.67 rows=5 width=14) (actual time=0.242..0.243 rows=1 loops=409,153)

  • Index Cond: ((decis_id = decis.decis_id) AND (stad_ispoln_kod = '5'::numeric))
14. 1,259.987 2,770.719 ↓ 1.0 3,127,966 1

Hash (cost=88,070.81..88,070.81 rows=3,081,481 width=95) (actual time=2,770.719..2,770.719 rows=3,127,966 loops=1)

  • Buckets: 65,536 Batches: 64 Memory Usage: 5,923kB
15. 1,510.732 1,510.732 ↓ 1.0 3,127,966 1

Seq Scan on kart_adr adr (cost=0.00..88,070.81 rows=3,081,481 width=95) (actual time=0.018..1,510.732 rows=3,127,966 loops=1)

16. 175,830.592 175,830.592 ↑ 1.0 1 369,392

Index Scan using delo_pkey on delo (cost=0.56..2.31 rows=1 width=12) (actual time=0.474..0.476 rows=1 loops=369,392)

  • Index Cond: (delo_id = e.delo_id)
17. 35,092.240 35,092.240 ↑ 1.0 1 369,392

Index Scan using docs_post_pkey on docs_post t (cost=0.43..2.15 rows=1 width=53) (actual time=0.094..0.095 rows=1 loops=369,392)

  • Index Cond: (docs_id = e.docs_post_id)
18. 0.703 16.734 ↑ 1.0 2,332 1

Hash (cost=1,189.32..1,189.32 rows=2,332 width=91) (actual time=16.734..16.734 rows=2,332 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 313kB
19. 16.031 16.031 ↑ 1.0 2,332 1

Seq Scan on fsspvksp osp (cost=0.00..1,189.32 rows=2,332 width=91) (actual time=0.640..16.031 rows=2,332 loops=1)

20. 113,033.952 113,033.952 ↑ 1.0 1 369,392

Index Scan using decis_ispoln_pkey on decis_ispoln di (cost=0.56..1.87 rows=1 width=11) (actual time=0.305..0.306 rows=1 loops=369,392)

  • Index Cond: (delo.decis_ispoln_last_id = decis_ispoln_id)
21.          

SubPlan (for Nested Loop Left Join)

22. 1,189.205 206,120.736 ↑ 1.0 1 369,392

Nested Loop (cost=0.87..5.71 rows=1 width=12) (actual time=0.556..0.558 rows=1 loops=369,392)

23. 104,907.328 104,907.328 ↑ 1.0 1 369,392

Index Scan using vehs_pkey on vehs v_1 (cost=0.43..2.85 rows=1 width=6) (actual time=0.284..0.284 rows=1 loops=369,392)

  • Index Cond: (vehs_id = t.vehs_id)
24. 100,024.203 100,024.203 ↑ 1.0 1 369,093

Index Scan using kart_docs_pkey on kart_docs kdr (cost=0.43..2.85 rows=1 width=18) (actual time=0.270..0.271 rows=1 loops=369,093)

  • Index Cond: (id = v_1.regno_id)
25. 1,107.804 109,709.424 ↑ 11.0 1 369,392

Hash Join (cost=1.77..49.45 rows=11 width=218) (actual time=0.293..0.297 rows=1 loops=369,392)

  • Hash Cond: (ta.type_id = ts.id)
26. 108,601.248 108,601.248 ↑ 11.0 1 369,392

Index Scan using delo_tags_delo_id on delo_tags ta (cost=0.57..48.10 rows=11 width=5) (actual time=0.291..0.294 rows=1 loops=369,392)

  • Index Cond: (delo_id = delo.delo_id)
  • Filter: (type_id = ANY ('{3,4,5}'::numeric[]))
  • Rows Removed by Filter: 2
27. 0.013 0.372 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=250) (actual time=0.372..0.372 rows=9 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
28. 0.359 0.359 ↑ 1.0 9 1

Seq Scan on s_stag_types ts (cost=0.00..1.09 rows=9 width=250) (actual time=0.357..0.359 rows=9 loops=1)

29. 2,955.136 2,955.136 ↑ 1.0 1 369,392

Index Scan using s_stotv_pkey on s_stotv stotv (cost=0.27..2.69 rows=1 width=15) (actual time=0.008..0.008 rows=1 loops=369,392)

  • Index Cond: (stotv_id = e.stotv_id)
30. 11,451.152 11,451.152 ↑ 1.0 1 369,392

Seq Scan on s_sasu_country country (cost=0.00..6.65 rows=1 width=25) (actual time=0.022..0.031 rows=1 loops=369,392)

  • Filter: ((code)::text = (adr.country_code)::text)
  • Rows Removed by Filter: 291
31. 5,540.880 5,540.880 ↑ 1.0 1 369,392

Seq Scan on kadr_region (cost=0.00..2.12 rows=1 width=32) (actual time=0.012..0.015 rows=1 loops=369,392)

  • Filter: ((priz_arh IS NULL) AND ((resp_kod)::text = (adr.region_kod)::text))
  • Rows Removed by Filter: 87
32. 369.392 72,770.224 ↓ 0.0 0 369,392

Limit (cost=20.81..20.81 rows=1 width=8) (actual time=0.197..0.197 rows=0 loops=369,392)

33. 2,216.352 72,400.832 ↓ 0.0 0 369,392

Sort (cost=20.81..20.85 rows=16 width=8) (actual time=0.196..0.196 rows=0 loops=369,392)

  • Sort Key: decis_ispoln.dat_stad_ispoln DESC
  • Sort Method: quicksort Memory: 25kB
34. 70,184.480 70,184.480 ↑ 16.0 1 369,392

Index Scan using di_decis_stad on decis_ispoln (cost=0.56..20.73 rows=16 width=8) (actual time=0.148..0.190 rows=1 loops=369,392)

  • Index Cond: ((e.decis_id = decis_id) AND (stad_ispoln_kod = ANY ('{11,21,22,23}'::numeric[])))
35. 2,585.744 2,585.744 ↑ 1.0 1 369,392

Seq Scan on s_sexecutive_status ss (cost=0.00..1.36 rows=1 width=138) (actual time=0.005..0.007 rows=1 loops=369,392)

  • Filter: (status_id = e.status_id)
  • Rows Removed by Filter: 28
36. 738.784 147,387.408 ↑ 1.0 1 369,392

Limit (cost=24.35..24.35 rows=1 width=102) (actual time=0.398..0.399 rows=1 loops=369,392)

37. 1,108.176 146,648.624 ↑ 28.0 1 369,392

Sort (cost=24.35..24.42 rows=28 width=102) (actual time=0.397..0.397 rows=1 loops=369,392)

  • Sort Key: ep.post_date DESC
  • Sort Method: quicksort Memory: 25kB
38. 1,090.808 145,540.448 ↑ 28.0 1 369,392

Hash Left Join (cost=13.56..24.21 rows=28 width=102) (actual time=0.254..0.394 rows=1 loops=369,392)

  • Hash Cond: (ep.spi_doc_type = dt.id)
39. 144,432.272 144,432.272 ↑ 28.0 1 369,392

Index Scan using docs_executive_post_docs_id on docs_executive_post ep (cost=0.43..10.69 rows=28 width=13) (actual time=0.252..0.391 rows=1 loops=369,392)

  • Index Cond: (docs_id = e.docs_id)
40. 3.322 17.368 ↑ 1.0 317 1

Hash (cost=9.17..9.17 rows=317 width=99) (actual time=1.043..17.368 rows=317 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 49kB
41. 14.046 14.046 ↑ 1.0 317 1

Seq Scan on s_sfssp_doc_types dt (cost=0.00..9.17 rows=317 width=99) (actual time=0.478..14.046 rows=317 loops=1)

42. 61.952 1,115.136 ↑ 1.0 1 61,952

Limit (cost=10.77..10.78 rows=1 width=120) (actual time=0.018..0.018 rows=1 loops=61,952)

43. 247.808 1,053.184 ↑ 3.0 1 61,952

Sort (cost=10.77..10.78 rows=3 width=120) (actual time=0.016..0.017 rows=1 loops=61,952)

  • Sort Key: ep_1.post_date DESC
  • Sort Method: quicksort Memory: 25kB
44. 805.376 805.376 ↑ 3.0 1 61,952

Index Scan using docs_executive_post_docs_id on docs_executive_post ep_1 (cost=0.43..10.76 rows=3 width=120) (actual time=0.011..0.013 rows=1 loops=61,952)

  • Index Cond: (docs_id = e.docs_id)
  • Filter: (spi_doc_type = '74'::numeric)
  • Rows Removed by Filter: 2
45. 307.440 2,766.960 ↑ 1.0 1 307,440

Limit (cost=10.83..10.83 rows=1 width=120) (actual time=0.009..0.009 rows=1 loops=307,440)

46. 614.880 2,459.520 ↑ 28.0 1 307,440

Sort (cost=10.83..10.90 rows=28 width=120) (actual time=0.008..0.008 rows=1 loops=307,440)

  • Sort Key: ep_2.post_date DESC
  • Sort Method: quicksort Memory: 25kB
47. 1,844.640 1,844.640 ↑ 28.0 1 307,440

Index Scan using docs_executive_post_docs_id on docs_executive_post ep_2 (cost=0.43..10.69 rows=28 width=120) (actual time=0.006..0.006 rows=1 loops=307,440)

  • Index Cond: (docs_id = e.docs_id)
48. 3,324.528 3,324.528 ↑ 1.0 1 369,392

Seq Scan on s_sstad_ispoln sdi (cost=0.00..1.60 rows=1 width=42) (actual time=0.007..0.009 rows=1 loops=369,392)

  • Filter: (stad_ispoln_kod = di.stad_ispoln_kod)
  • Rows Removed by Filter: 47
Planning time : 25.013 ms
Execution time : 1,146,928.273 ms