explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3Qkx

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 1,334.516 ↑ 1.0 12 1

Limit (cost=71.38..131.67 rows=12 width=4,101) (actual time=1,333.441..1,334.516 rows=12 loops=1)

2. 0.024 1,334.502 ↑ 7,218.2 12 1

Nested Loop Left Join (cost=71.38..435,299.83 rows=86,619 width=4,101) (actual time=1,333.439..1,334.502 rows=12 loops=1)

3. 0.028 1,334.454 ↑ 7,218.2 12 1

Nested Loop Left Join (cost=71.24..421,882.59 rows=86,619 width=3,989) (actual time=1,333.432..1,334.454 rows=12 loops=1)

  • Join Filter: ("refCtgtsFlTypes".id = "ctgtsFlTypes".ref_ctgts_fl_types_id)
  • Rows Removed by Join Filter: 5
4. 0.042 1,334.426 ↑ 7,218.2 12 1

Nested Loop Left Join (cost=71.24..418,633.34 rows=86,619 width=3,857) (actual time=1,333.424..1,334.426 rows=12 loops=1)

  • Join Filter: ("refGlblCtgtsType".id = ctgts.ref_glbl_ctgts_type_id)
5. 0.032 1,334.384 ↑ 7,218.2 12 1

Nested Loop Left Join (cost=71.24..415,384.09 rows=86,619 width=3,725) (actual time=1,333.416..1,334.384 rows=12 loops=1)

6. 0.029 1,334.340 ↑ 7,218.2 12 1

Nested Loop Left Join (cost=70.96..382,344.60 rows=86,619 width=3,534) (actual time=1,333.408..1,334.340 rows=12 loops=1)

7. 0.031 1,334.299 ↑ 7,218.2 12 1

Nested Loop Left Join (cost=70.67..351,910.67 rows=86,619 width=3,477) (actual time=1,333.399..1,334.299 rows=12 loops=1)

8. 0.022 1,334.256 ↑ 7,218.2 12 1

Nested Loop Left Join (cost=70.39..322,874.28 rows=86,619 width=3,433) (actual time=1,333.391..1,334.256 rows=12 loops=1)

9. 0.033 1,334.210 ↑ 7,218.2 12 1

Nested Loop Left Join (cost=70.11..293,352.79 rows=86,619 width=3,429) (actual time=1,333.382..1,334.210 rows=12 loops=1)

10. 0.011 1,334.120 ↑ 2,545.3 3 1

Nested Loop Left Join (cost=69.53..256,981.75 rows=7,636 width=3,396) (actual time=1,333.367..1,334.120 rows=3 loops=1)

11. 0.010 1,334.100 ↑ 2,545.3 3 1

Nested Loop Left Join (cost=69.25..254,147.41 rows=7,636 width=3,262) (actual time=1,333.358..1,334.100 rows=3 loops=1)

  • Join Filter: ("refCtsInsSidesType".id = "ctsInsSide".ref_cts_ins_sides_type_id)
  • Rows Removed by Join Filter: 7
12. 0.024 1,334.087 ↑ 2,545.3 3 1

Nested Loop Left Join (cost=69.25..253,319.03 rows=7,636 width=3,162) (actual time=1,333.351..1,334.087 rows=3 loops=1)

13. 0.008 1,334.054 ↑ 2,545.3 3 1

Nested Loop Left Join (cost=68.97..250,742.46 rows=7,636 width=3,142) (actual time=1,333.329..1,334.054 rows=3 loops=1)

14. 0.007 1,334.036 ↑ 1,446.0 2 1

Nested Loop Left Join (cost=68.69..249,451.49 rows=2,892 width=3,138) (actual time=1,333.319..1,334.036 rows=2 loops=1)

  • Join Filter: ("refCtsInsScanUseType".id = "refCtsInsScanType".ref_cts_ins_scan_use_type_id)
15. 0.006 1,334.027 ↑ 1,446.0 2 1

Nested Loop Left Join (cost=68.69..249,365.63 rows=2,892 width=3,038) (actual time=1,333.313..1,334.027 rows=2 loops=1)

  • Join Filter: ("scanTypeRefCtsInsSidesType".id = "refCtsInsScanType".ref_cts_ins_sides_type_id)
  • Rows Removed by Join Filter: 16
16. 0.008 1,334.015 ↑ 1,446.0 2 1

Nested Loop Left Join (cost=68.69..249,035.51 rows=2,892 width=2,938) (actual time=1,333.304..1,334.015 rows=2 loops=1)

  • Join Filter: ("refInsScanCheckError".id = "ctsInsScanCheck".ref_ins_scan_check_error_id)
  • Rows Removed by Join Filter: 8
17. 0.007 1,334.003 ↑ 1,446.0 2 1

Nested Loop Left Join (cost=68.69..248,861.41 rows=2,892 width=2,837) (actual time=1,333.296..1,334.003 rows=2 loops=1)

  • Join Filter: ("refInsScanCheckStatus".id = "ctsInsScanCheck".ref_ins_scan_check_status_id)
18. 0.006 1,333.990 ↑ 1,446.0 2 1

Nested Loop Left Join (cost=68.69..248,712.86 rows=2,892 width=2,736) (actual time=1,333.286..1,333.990 rows=2 loops=1)

19. 0.006 1,333.980 ↑ 1,446.0 2 1

Nested Loop Left Join (cost=68.55..248,252.63 rows=2,892 width=2,632) (actual time=1,333.280..1,333.980 rows=2 loops=1)

20. 0.007 1,333.968 ↑ 1,446.0 2 1

Nested Loop Left Join (cost=68.41..247,808.66 rows=2,892 width=2,520) (actual time=1,333.273..1,333.968 rows=2 loops=1)

21. 0.007 1,333.961 ↑ 1,446.0 2 1

Nested Loop Left Join (cost=68.14..246,926.10 rows=2,892 width=1,971) (actual time=1,333.268..1,333.961 rows=2 loops=1)

22. 0.005 1,333.948 ↑ 1,446.0 2 1

Nested Loop Left Join (cost=67.86..245,428.40 rows=2,892 width=1,598) (actual time=1,333.261..1,333.948 rows=2 loops=1)

23. 0.007 1,333.935 ↑ 1,446.0 2 1

Nested Loop Left Join (cost=67.58..244,466.83 rows=2,892 width=1,049) (actual time=1,333.254..1,333.935 rows=2 loops=1)

24. 1.521 1,333.916 ↑ 1,446.0 2 1

Hash Left Join (cost=67.44..243,963.85 rows=2,892 width=911) (actual time=1,333.240..1,333.916 rows=2 loops=1)

  • Hash Cond: ("ctsInsVers".cts_id = cts.id)
  • Filter: (SubPlan 1)
  • Rows Removed by Filter: 886
25. 502.090 791.839 ↑ 6.5 888 1

Nested Loop Left Join (cost=0.00..243,495.89 rows=5,783 width=854) (actual time=3.609..791.839 rows=888 loops=1)

  • Join Filter: ("ctsInsScanCheck".cts_ins_id = "ctsIns".id)
  • Rows Removed by Join Filter: 5125056
26. 1.996 58.242 ↑ 2.3 887 1

Nested Loop Left Join (cost=0.00..64,325.92 rows=2,064 width=739) (actual time=0.072..58.242 rows=887 loops=1)

  • Join Filter: ("ctsInsRefInsScanCheckStatus".id = "ctsIns".ref_ins_scan_check_status_id)
  • Rows Removed by Join Filter: 3544
27. 1.410 56.246 ↑ 2.3 887 1

Nested Loop Left Join (cost=0.00..64,211.65 rows=2,064 width=638) (actual time=0.060..56.246 rows=887 loops=1)

  • Join Filter: (partner.id = "ctsIns".partner_id)
  • Rows Removed by Join Filter: 4368
28. 32.336 53.949 ↑ 2.3 887 1

Nested Loop Left Join (cost=0.00..63,986.95 rows=2,064 width=243) (actual time=0.050..53.949 rows=887 loops=1)

  • Join Filter: ("ctsIns".id = "ctsInsVers".cts_ins_id)
  • Rows Removed by Join Filter: 396019
29. 0.325 0.325 ↑ 2.3 887 1

Seq Scan on cts_ins_vers "ctsInsVers" (cost=0.00..54.64 rows=2,064 width=99) (actual time=0.024..0.325 rows=887 loops=1)

30. 20.623 21.288 ↑ 4.6 447 887

Materialize (cost=0.00..66.96 rows=2,064 width=144) (actual time=0.000..0.024 rows=447 loops=887)

31. 0.665 0.665 ↑ 1.3 1,581 1

Seq Scan on cts_ins "ctsIns" (cost=0.00..56.64 rows=2,064 width=144) (actual time=0.015..0.665 rows=1,581 loops=1)

32. 0.884 0.887 ↑ 1.3 6 887

Materialize (cost=0.00..1.12 rows=8 width=395) (actual time=0.000..0.001 rows=6 loops=887)

33. 0.003 0.003 ↑ 1.1 7 1

Seq Scan on partners partner (cost=0.00..1.08 rows=8 width=395) (actual time=0.002..0.003 rows=7 loops=1)

34. 0.000 0.000 ↑ 1.0 4 887

Materialize (cost=0.00..1.06 rows=4 width=101) (actual time=0.000..0.000 rows=4 loops=887)

35. 0.008 0.008 ↑ 1.0 4 1

Seq Scan on ref_ins_scans_check_status "ctsInsRefInsScanCheckStatus" (cost=0.00..1.04 rows=4 width=101) (actual time=0.007..0.008 rows=4 loops=1)

36. 230.153 231.507 ↑ 1.0 5,778 887

Materialize (cost=0.00..142.75 rows=5,783 width=115) (actual time=0.000..0.261 rows=5,778 loops=887)

37. 1.354 1.354 ↑ 1.0 5,783 1

Seq Scan on cts_ins_scans_check "ctsInsScanCheck" (cost=0.00..113.83 rows=5,783 width=115) (actual time=0.009..1.354 rows=5,783 loops=1)

38. 0.296 0.652 ↑ 1.0 2,064 1

Hash (cost=41.64..41.64 rows=2,064 width=57) (actual time=0.652..0.652 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 199kB
39. 0.356 0.356 ↑ 1.0 2,064 1

Seq Scan on cts (cost=0.00..41.64 rows=2,064 width=57) (actual time=0.017..0.356 rows=2,064 loops=1)

40.          

SubPlan (for Hash Left Join)

41. 0.888 539.904 ↓ 0.0 0 888

Unique (cost=128.41..128.45 rows=6 width=16) (actual time=0.608..0.608 rows=0 loops=888)

42. 4.440 539.016 ↓ 0.0 0 888

Sort (cost=128.41..128.43 rows=8 width=16) (actual time=0.607..0.607 rows=0 loops=888)

  • Sort Key: "ctsInsScanCheck_1".ref_cts_ins_doc_type_id, "ctsInsScanCheck_1".check_finish_date DESC
  • Sort Method: quicksort Memory: 25kB
43. 534.576 534.576 ↓ 0.0 0 888

Seq Scan on cts_ins_scans_check "ctsInsScanCheck_1" (cost=0.00..128.29 rows=8 width=16) (actual time=0.601..0.602 rows=0 loops=888)

  • Filter: (cts_id = cts.id)
  • Rows Removed by Filter: 5783
44. 0.012 0.012 ↑ 1.0 1 2

Index Scan using "PK_7f37d3b42defea97f1df0d19535" on branches branch (cost=0.14..0.17 rows=1 width=138) (actual time=0.006..0.006 rows=1 loops=2)

  • Index Cond: (id = "ctsIns".branch_id)
45. 0.008 0.008 ↑ 1.0 1 2

Index Scan using "PK_a3ffb1c0c8416b9fc6f907b7433" on users "user" (cost=0.27..0.33 rows=1 width=549) (actual time=0.004..0.004 rows=1 loops=2)

  • Index Cond: (id = "ctsIns".user_id)
46. 0.006 0.006 ↑ 1.0 1 2

Index Scan using "PK_4a03375200654d139438508ede5" on cts_ins_scans "ctsInsScan" (cost=0.28..0.52 rows=1 width=373) (actual time=0.003..0.003 rows=1 loops=2)

  • Index Cond: (id = "ctsInsScanCheck".cts_ins_scan_id)
47. 0.000 0.000 ↓ 0.0 0 2

Index Scan using "PK_a3ffb1c0c8416b9fc6f907b7433" on users "lastCheckUser" (cost=0.27..0.31 rows=1 width=549) (actual time=0.000..0.000 rows=0 loops=2)

  • Index Cond: (id = "ctsInsScanCheck".last_check_user_id)
48. 0.006 0.006 ↑ 1.0 1 2

Index Scan using "PK_ae88ef275eb2d34ee9071ebab42" on ref_cts_ins_scan_types "refCtsInsScanType" (cost=0.14..0.15 rows=1 width=112) (actual time=0.003..0.003 rows=1 loops=2)

  • Index Cond: (id = "ctsInsScanCheck".ref_cts_ins_scan_type_id)
49. 0.004 0.004 ↑ 1.0 1 2

Index Scan using "PK_f371d0902fd20e097bb530af768" on ref_cts_ins_docs_types "refCtsInsDocType" (cost=0.14..0.16 rows=1 width=104) (actual time=0.002..0.002 rows=1 loops=2)

  • Index Cond: (id = "ctsInsScanCheck".ref_cts_ins_doc_type_id)
50. 0.001 0.006 ↑ 4.0 1 2

Materialize (cost=0.00..1.06 rows=4 width=101) (actual time=0.003..0.003 rows=1 loops=2)

51. 0.005 0.005 ↑ 4.0 1 1

Seq Scan on ref_ins_scans_check_status "refInsScanCheckStatus" (cost=0.00..1.04 rows=4 width=101) (actual time=0.005..0.005 rows=1 loops=1)

52. 0.001 0.004 ↑ 1.0 4 2

Materialize (cost=0.00..1.06 rows=4 width=101) (actual time=0.002..0.002 rows=4 loops=2)

53. 0.003 0.003 ↑ 1.0 4 1

Seq Scan on ref_ins_scans_check_errors "refInsScanCheckError" (cost=0.00..1.04 rows=4 width=101) (actual time=0.003..0.003 rows=4 loops=1)

54. 0.003 0.006 ↑ 1.0 8 2

Materialize (cost=0.00..1.12 rows=8 width=100) (actual time=0.002..0.003 rows=8 loops=2)

55. 0.003 0.003 ↑ 1.0 8 1

Seq Scan on ref_cts_ins_sides_types "scanTypeRefCtsInsSidesType" (cost=0.00..1.08 rows=8 width=100) (actual time=0.003..0.003 rows=8 loops=1)

56. 0.000 0.002 ↑ 2.0 1 2

Materialize (cost=0.00..1.03 rows=2 width=100) (actual time=0.001..0.001 rows=1 loops=2)

57. 0.002 0.002 ↑ 2.0 1 1

Seq Scan on ref_cts_ins_scan_use_types "refCtsInsScanUseType" (cost=0.00..1.02 rows=2 width=100) (actual time=0.002..0.002 rows=1 loops=1)

58. 0.010 0.010 ↑ 1.5 2 2

Index Only Scan using "PK_254d1a736e45460d7d469c21628" on cts_ins_sides_vers "ctsIns_ctsInsSide" (cost=0.28..0.42 rows=3 width=8) (actual time=0.004..0.005 rows=2 loops=2)

  • Index Cond: (cts_ins_id = "ctsIns".id)
  • Heap Fetches: 3
59. 0.009 0.009 ↑ 1.0 1 3

Index Scan using "PK_15849ffa7565341c66ade4b2ddc" on cts_ins_sides "ctsInsSide" (cost=0.28..0.34 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=3)

  • Index Cond: (id = "ctsIns_ctsInsSide".cts_ins_sides_id)
60. 0.001 0.003 ↑ 2.7 3 3

Materialize (cost=0.00..1.12 rows=8 width=100) (actual time=0.001..0.001 rows=3 loops=3)

61. 0.002 0.002 ↑ 1.0 8 1

Seq Scan on ref_cts_ins_sides_types "refCtsInsSidesType" (cost=0.00..1.08 rows=8 width=100) (actual time=0.002..0.002 rows=8 loops=1)

62. 0.009 0.009 ↑ 1.0 1 3

Index Scan using "PK_a02f237db367b27bf89a907d665" on ctgts_fl_vers "ctgtsFlVers" (cost=0.28..0.37 rows=1 width=134) (actual time=0.003..0.003 rows=1 loops=3)

  • Index Cond: (id = "ctsInsSide".ctgts_fl_vers_id)
63. 0.006 0.057 ↑ 2.8 4 3

Nested Loop Left Join (cost=0.57..4.65 rows=11 width=37) (actual time=0.007..0.019 rows=4 loops=3)

64. 0.015 0.015 ↑ 2.8 4 3

Index Only Scan using "PK_f98010849793b1aea1680448111" on cts_ins_statuses_vers "ctsIns_ctsInsStatuses" (cost=0.29..0.81 rows=11 width=8) (actual time=0.003..0.005 rows=4 loops=3)

  • Index Cond: (cts_ins_id = "ctsIns".id)
  • Heap Fetches: 12
65. 0.036 0.036 ↑ 1.0 1 12

Index Scan using "PK_d245bc1ad5b1ee18173ce95417e" on cts_ins_statuses "ctsInsStatuses" (cost=0.29..0.35 rows=1 width=33) (actual time=0.003..0.003 rows=1 loops=12)

  • Index Cond: (id = "ctsIns_ctsInsStatuses".cts_ins_statuses_id)
66. 0.024 0.024 ↑ 1.0 1 12

Index Only Scan using "PK_770baa493d76ba3f90c7c7dfbf0" on ctgts_fl_types_vers "ctgtsFlVers_ctgtsFlTypes" (cost=0.28..0.33 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=12)

  • Index Cond: (ctgts_fl_vers_id = "ctgtsFlVers".id)
  • Heap Fetches: 12
67. 0.012 0.012 ↑ 1.0 1 12

Index Scan using "PK_39333148faecb7780dac67da0d2" on ctgts_fl_types "ctgtsFlTypes" (cost=0.28..0.34 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=12)

  • Index Cond: (id = "ctgtsFlVers_ctgtsFlTypes".ctgts_fl_types_id)
68. 0.012 0.012 ↑ 1.0 1 12

Index Scan using "PK_bc0006cfa6e0330bd5cfe4f5cb2" on ctgts (cost=0.28..0.35 rows=1 width=57) (actual time=0.001..0.001 rows=1 loops=12)

  • Index Cond: (id = "ctgtsFlVers".ctgts_id)
69. 0.012 0.012 ↑ 1.0 1 12

Index Scan using "PK_85ae76faeb0c540319ad60a1e90" on ctgts_fl_data_names "ctgtsFlDataName" (cost=0.28..0.38 rows=1 width=191) (actual time=0.001..0.001 rows=1 loops=12)

  • Index Cond: (id = "ctgtsFlVers".ctgts_fl_data_name_id)
70. 0.000 0.000 ↑ 3.0 1 12

Materialize (cost=0.00..1.04 rows=3 width=132) (actual time=0.000..0.000 rows=1 loops=12)

71. 0.002 0.002 ↑ 3.0 1 1

Seq Scan on ref_glbl_ctgts_types "refGlblCtgtsType" (cost=0.00..1.03 rows=3 width=132) (actual time=0.002..0.002 rows=1 loops=1)

72. 0.000 0.000 ↑ 3.0 1 12

Materialize (cost=0.00..1.04 rows=3 width=132) (actual time=0.000..0.000 rows=1 loops=12)

73. 0.002 0.002 ↑ 1.5 2 1

Seq Scan on ref_ctgts_fl_types "refCtgtsFlTypes" (cost=0.00..1.03 rows=3 width=132) (actual time=0.002..0.002 rows=2 loops=1)

74. 0.024 0.024 ↑ 1.0 1 12

Index Scan using "PK_e77816b8b0eb11a98eebc1b2f66" on ref_ins_statuses "refInsStatuses" (cost=0.14..0.16 rows=1 width=112) (actual time=0.002..0.002 rows=1 loops=12)

  • Index Cond: (id = "ctsInsStatuses".ref_ins_statuses_id)
Planning time : 18.802 ms
Execution time : 1,335.675 ms