explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iWM1

Settings
# exclusive inclusive rows x rows loops node
1. 0.030 11,406.663 ↑ 1.0 200 1

Limit (cost=910,568.71..1,251,908.21 rows=200 width=884) (actual time=11,359.645..11,406.663 rows=200 loops=1)

2.          

CTE sections

3. 12.302 150.855 ↓ 1.0 15,149 1

WindowAgg (cost=39,071.46..39,333.77 rows=14,989 width=60) (actual time=134.229..150.855 rows=15,149 loops=1)

4. 13.334 138.553 ↓ 1.0 15,149 1

Sort (cost=39,071.46..39,108.93 rows=14,989 width=104) (actual time=134.207..138.553 rows=15,149 loops=1)

  • Sort Key: sec."Number
  • Sort Method: quicksort Memory: 1568kB
5. 7.667 125.219 ↓ 1.0 15,149 1

Hash Left Join (cost=2,146.40..38,031.85 rows=14,989 width=104) (actual time=29.690..125.219 rows=15,149 loops=1)

  • Hash Cond: (ob."Id" = ddoc."DiagnosticObjectId")
6. 9.171 89.603 ↓ 1.0 15,149 1

Nested Loop (cost=189.68..36,013.87 rows=14,989 width=28) (actual time=1.258..89.603 rows=15,149 loops=1)

7. 3.469 4.687 ↓ 1.0 15,149 1

Bitmap Heap Scan on "DiagnosticObject" ob (cost=189.25..10,636.83 rows=15,139 width=16) (actual time=1.242..4.687 rows=15,149 loops=1)

  • Recheck Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
  • Heap Blocks: exact=157
8. 1.218 1.218 ↓ 1.0 15,149 1

Bitmap Index Scan on "IX_DiagnosticSection_DiagnosticTargetId" (cost=0.00..185.47 rows=15,139 width=0) (actual time=1.218..1.218 rows=15,149 loops=1)

  • Index Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
9. 75.745 75.745 ↑ 1.0 1 15,149

Index Scan using "PK_Section" on "Section" sec (cost=0.43..1.67 rows=1 width=28) (actual time=0.005..0.005 rows=1 loops=15,149)

  • Index Cond: ("Id" = ob."Id")
10. 16.501 27.949 ↑ 1.0 49,232 1

Hash (cost=1,341.32..1,341.32 rows=49,232 width=92) (actual time=27.949..27.949 rows=49,232 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 6519kB
11. 11.448 11.448 ↑ 1.0 49,232 1

Seq Scan on "DiagnosticObjectCoordinate" ddoc (cost=0.00..1,341.32 rows=49,232 width=92) (actual time=0.008..11.448 rows=49,232 loops=1)

12.          

CTE marker

13. 2.246 9.587 ↑ 87.9 182 1

Hash Join (cost=292.57..982.24 rows=16,000 width=54) (actual time=4.830..9.587 rows=182 loops=1)

  • Hash Cond: (sections."Id" = mar."SectionId")
14. 2.579 2.579 ↓ 1.0 15,149 1

CTE Scan on sections (cost=0.00..299.78 rows=14,989 width=24) (actual time=0.002..2.579 rows=15,149 loops=1)

15. 2.560 4.762 ↑ 1.0 8,292 1

Hash (cost=188.92..188.92 rows=8,292 width=70) (actual time=4.762..4.762 rows=8,292 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 974kB
16. 2.202 2.202 ↑ 1.0 8,292 1

Seq Scan on "Marker" mar (cost=0.00..188.92 rows=8,292 width=70) (actual time=0.029..2.202 rows=8,292 loops=1)

17.          

CTE dobjects

18. 198.917 533.537 ↓ 1.0 15,149 1

Hash Left Join (cost=2,272.13..48,656.17 rows=14,989 width=790) (actual time=46.215..533.537 rows=15,149 loops=1)

  • Hash Cond: (sect."Id" = diagobjcoord."DiagnosticObjectId")
19. 8.878 291.463 ↓ 1.0 15,149 1

Hash Left Join (cost=192.33..43,667.15 rows=14,989 width=224) (actual time=2.341..291.463 rows=15,149 loops=1)

  • Hash Cond: (sect."PipeTypeId" = pt."Id")
20. 12.212 282.567 ↓ 1.0 15,149 1

Nested Loop Left Join (cost=191.22..43,459.94 rows=14,989 width=206) (actual time=2.306..282.567 rows=15,149 loops=1)

21. 12.276 149.163 ↓ 1.0 15,149 1

Hash Left Join (cost=190.79..36,221.09 rows=14,989 width=62) (actual time=2.274..149.163 rows=15,149 loops=1)

  • Hash Cond: (sect."SectionTypeId" = st."Id")
22. 22.507 136.867 ↓ 1.0 15,149 1

Nested Loop (cost=189.68..36,013.87 rows=14,989 width=48) (actual time=2.220..136.867 rows=15,149 loops=1)

23. 6.169 8.317 ↓ 1.0 15,149 1

Bitmap Heap Scan on "DiagnosticObject" diagobj (cost=189.25..10,636.83 rows=15,139 width=16) (actual time=2.195..8.317 rows=15,149 loops=1)

  • Recheck Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
  • Filter: ("vrDeleted" IS FALSE)
  • Heap Blocks: exact=157
24. 2.148 2.148 ↓ 1.0 15,149 1

Bitmap Index Scan on "IX_DiagnosticSection_DiagnosticTargetId" (cost=0.00..185.47 rows=15,139 width=0) (actual time=2.148..2.148 rows=15,149 loops=1)

  • Index Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
25. 106.043 106.043 ↑ 1.0 1 15,149

Index Scan using "PK_Section" on "Section" sect (cost=0.43..1.67 rows=1 width=48) (actual time=0.007..0.007 rows=1 loops=15,149)

  • Index Cond: ("Id" = diagobj."Id")
26. 0.010 0.020 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=22) (actual time=0.020..0.020 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
27. 0.010 0.010 ↑ 1.0 5 1

Seq Scan on "SectionType" st (cost=0.00..1.05 rows=5 width=22) (actual time=0.007..0.010 rows=5 loops=1)

28. 121.192 121.192 ↑ 1.0 1 15,149

Index Scan using "PK_SectionAddonData" on "SectionAddonData" sectionaddondata (cost=0.43..0.47 rows=1 width=160) (actual time=0.008..0.008 rows=1 loops=15,149)

  • Index Cond: ("Id" = sect."Id")
29. 0.012 0.018 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=26) (actual time=0.018..0.018 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.006 0.006 ↑ 1.0 5 1

Seq Scan on "PipeType" pt (cost=0.00..1.05 rows=5 width=26) (actual time=0.003..0.006 rows=5 loops=1)

31. 23.732 43.157 ↑ 1.0 49,232 1

Hash (cost=1,464.40..1,464.40 rows=49,232 width=92) (actual time=43.157..43.157 rows=49,232 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 6519kB
32. 19.425 19.425 ↑ 1.0 49,232 1

Seq Scan on "DiagnosticObjectCoordinate" diagobjcoord (cost=0.00..1,464.40 rows=49,232 width=92) (actual time=0.008..19.425 rows=49,232 loops=1)

  • Filter: ("CoordinateSystemId" = '72b16dc7-f56e-4203-ba60-7b369f444c88'::uuid)
33.          

CTE darts

34. 1,531.074 9,823.639 ↑ 1.7 57,308 1

Hash Left Join (cost=109,516.85..788,465.87 rows=99,452 width=752) (actual time=5,640.136..9,823.639 rows=57,308 loops=1)

  • Hash Cond: (artmeas."SurfaceLocationId" = surfacelocation."Id")
35. 46.257 8,292.541 ↑ 1.7 57,308 1

Hash Left Join (cost=109,515.74..745,824.71 rows=99,452 width=1,399) (actual time=5,639.898..8,292.541 rows=57,308 loops=1)

  • Hash Cond: (sect_1."Id" = diagobjcoord_1."DiagnosticObjectId")
36. 76.770 8,213.875 ↑ 1.7 57,308 1

Nested Loop Left Join (cost=107,435.94..743,338.11 rows=99,452 width=1,339) (actual time=5,606.934..8,213.875 rows=57,308 loops=1)

37. 39.949 7,850.565 ↑ 1.7 57,308 1

Hash Left Join (cost=107,435.51..690,142.28 rows=99,452 width=550) (actual time=5,606.918..7,850.565 rows=57,308 loops=1)

  • Hash Cond: (defecttype."Id" = "defectTypeDefectGroupRef"."DefectTypeId")
38. 66.515 7,810.535 ↑ 1.7 57,308 1

Hash Left Join (cost=107,431.47..688,839.37 rows=99,452 width=562) (actual time=5,606.794..7,810.535 rows=57,308 loops=1)

  • Hash Cond: (artifact."Id" = sac."ArtifactId")
39. 43.147 6,261.289 ↑ 1.7 57,308 1

Hash Left Join (cost=36,984.29..617,991.45 rows=99,452 width=562) (actual time=4,120.232..6,261.289 rows=57,308 loops=1)

  • Hash Cond: (artifactclass."DefectTypeId" = defecttype."Id")
40. 37.345 6,218.056 ↑ 1.7 57,308 1

Hash Left Join (cost=36,979.03..616,929.80 rows=99,452 width=562) (actual time=4,120.135..6,218.056 rows=57,308 loops=1)

  • Hash Cond: (artifactaddonpof."POFAnomalyClassId" = pofanomalyclass."Id")
41. 39.461 6,180.695 ↑ 1.7 57,308 1

Hash Left Join (cost=36,977.87..615,694.91 rows=99,452 width=573) (actual time=4,120.108..6,180.695 rows=57,308 loops=1)

  • Hash Cond: (artifactaddonpof."POFArtifactIdentification" = pofartifactidentification."Id")
42. 19.821 6,141.177 ↑ 1.7 57,308 1

Nested Loop Left Join (cost=36,974.61..614,332.27 rows=99,452 width=549) (actual time=4,120.038..6,141.177 rows=57,308 loops=1)

43. 40.320 5,662.892 ↑ 1.7 57,308 1

Hash Left Join (cost=36,974.17..563,744.54 rows=99,452 width=304) (actual time=4,120.010..5,662.892 rows=57,308 loops=1)

  • Hash Cond: (artifactaddonpof."POFArtifactTypeId" = pofartifacttype."Id")
44. 76.375 5,622.543 ↑ 1.7 57,308 1

Nested Loop Left Join (cost=36,972.72..562,375.62 rows=99,452 width=291) (actual time=4,119.968..5,622.543 rows=57,308 loops=1)

45. 43.446 5,087.704 ↑ 1.7 57,308 1

Hash Left Join (cost=36,972.29..513,826.20 rows=99,452 width=243) (actual time=4,119.937..5,087.704 rows=57,308 loops=1)

  • Hash Cond: (artifact."ClassId" = artifactclass."Id")
46. 61.350 5,044.057 ↑ 1.7 57,308 1

Nested Loop Left Join (cost=36,962.54..512,448.98 rows=99,452 width=187) (actual time=4,119.669..5,044.057 rows=57,308 loops=1)

47. 2,791.635 4,409.627 ↑ 1.7 57,308 1

Hash Join (cost=36,962.11..464,478.06 rows=99,452 width=145) (actual time=4,119.617..4,409.627 rows=57,308 loops=1)

  • Hash Cond: (artifact."DiagnosticObjectId" = diagobj_1."Id")
48. 1,348.867 1,348.867 ↑ 1.0 9,530,948 1

Seq Scan on "Artifact" artifact (cost=0.00..390,544.77 rows=9,593,777 width=89) (actual time=0.014..1,348.867 rows=9,530,948 loops=1)

49. 9.123 269.125 ↓ 1.0 15,149 1

Hash (cost=36,772.87..36,772.87 rows=15,139 width=88) (actual time=269.125..269.125 rows=15,149 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1490kB
50. 15.489 260.002 ↓ 1.0 15,149 1

Nested Loop Left Join (cost=10,830.55..36,772.87 rows=15,139 width=88) (actual time=143.383..260.002 rows=15,149 loops=1)

51. 6.153 183.917 ↓ 1.0 15,149 1

Hash Left Join (cost=10,830.12..11,395.82 rows=15,139 width=52) (actual time=143.369..183.917 rows=15,149 loops=1)

  • Hash Cond: (diagobj_1."DiagnosticTargetId" = "innerDiagnosticTarget"."Id")
52. 11.516 177.685 ↓ 1.0 15,149 1

Hash Right Join (cost=10,826.07..11,183.61 rows=15,139 width=64) (actual time=143.267..177.685 rows=15,149 loops=1)

  • Hash Cond: (sections_1."Id" = diagobj_1."Id")
53. 157.290 157.290 ↓ 1.0 15,149 1

CTE Scan on sections sections_1 (cost=0.00..299.78 rows=14,989 width=48) (actual time=134.241..157.290 rows=15,149 loops=1)

54. 3.762 8.879 ↓ 1.0 15,149 1

Hash (cost=10,636.83..10,636.83 rows=15,139 width=32) (actual time=8.879..8.879 rows=15,149 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1075kB
55. 3.615 5.117 ↓ 1.0 15,149 1

Bitmap Heap Scan on "DiagnosticObject" diagobj_1 (cost=189.25..10,636.83 rows=15,139 width=32) (actual time=1.542..5.117 rows=15,149 loops=1)

  • Recheck Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
  • Filter: ("vrDeleted" IS FALSE)
  • Heap Blocks: exact=157
56. 1.502 1.502 ↓ 1.0 15,149 1

Bitmap Index Scan on "IX_DiagnosticSection_DiagnosticTargetId" (cost=0.00..185.47 rows=15,139 width=0) (actual time=1.502..1.502 rows=15,149 loops=1)

  • Index Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
57. 0.003 0.079 ↑ 1.0 1 1

Hash (cost=4.05..4.05 rows=1 width=20) (actual time=0.079..0.079 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
58. 0.033 0.076 ↑ 1.0 1 1

Hash Right Join (cost=2.38..4.05 rows=1 width=20) (actual time=0.071..0.076 rows=1 loops=1)

  • Hash Cond: ("constructiveDiameter"."Id" = "innerDiagnosticTarget"."DiameterId")
59. 0.017 0.017 ↑ 1.0 48 1

Seq Scan on "ConstructiveDiameter" "constructiveDiameter" (cost=0.00..1.48 rows=48 width=8) (actual time=0.012..0.017 rows=48 loops=1)

60. 0.004 0.026 ↑ 1.0 1 1

Hash (cost=2.36..2.36 rows=1 width=20) (actual time=0.026..0.026 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
61. 0.022 0.022 ↑ 1.0 1 1

Index Scan using "PK_InnerDiagnosticTarget" on "InnerDiagnosticTarget" "innerDiagnosticTarget" (cost=0.14..2.36 rows=1 width=20) (actual time=0.022..0.022 rows=1 loops=1)

  • Index Cond: ("Id" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
62. 60.596 60.596 ↑ 1.0 1 15,149

Index Scan using "PK_Section" on "Section" sect_1 (cost=0.43..1.67 rows=1 width=36) (actual time=0.004..0.004 rows=1 loops=15,149)

  • Index Cond: ("Id" = diagobj_1."Id")
63. 573.080 573.080 ↑ 1.0 1 57,308

Index Scan using "PK_ArtifactAddonMeasured" on "ArtifactAddonMeasured" artmeas (cost=0.43..0.47 rows=1 width=58) (actual time=0.009..0.010 rows=1 loops=57,308)

  • Index Cond: ("Id" = artifact."Id")
64. 0.117 0.201 ↑ 1.0 211 1

Hash (cost=7.11..7.11 rows=211 width=72) (actual time=0.201..0.201 rows=211 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 29kB
65. 0.084 0.084 ↑ 1.0 211 1

Seq Scan on "ArtifactClass" artifactclass (cost=0.00..7.11 rows=211 width=72) (actual time=0.018..0.084 rows=211 loops=1)

66. 458.464 458.464 ↑ 1.0 1 57,308

Index Scan using "PK_ArtifactAddonPOF" on "ArtifactAddonPOF" artifactaddonpof (cost=0.43..0.48 rows=1 width=64) (actual time=0.008..0.008 rows=1 loops=57,308)

  • Index Cond: ("Id" = artifact."Id")
67. 0.016 0.029 ↑ 1.0 20 1

Hash (cost=1.20..1.20 rows=20 width=45) (actual time=0.029..0.029 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
68. 0.013 0.013 ↑ 1.0 20 1

Seq Scan on "POFArtifactType" pofartifacttype (cost=0.00..1.20 rows=20 width=45) (actual time=0.009..0.013 rows=20 loops=1)

69. 458.464 458.464 ↑ 1.0 1 57,308

Index Scan using "PK_ArtifactAddonData" on "ArtifactAddonData" artifactaddondata (cost=0.43..0.50 rows=1 width=261) (actual time=0.007..0.008 rows=1 loops=57,308)

  • Index Cond: ("Id" = artifact."Id")
70. 0.032 0.057 ↑ 1.0 56 1

Hash (cost=2.56..2.56 rows=56 width=56) (actual time=0.057..0.057 rows=56 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
71. 0.025 0.025 ↑ 1.0 56 1

Seq Scan on "POFArtifactIdentification" pofartifactidentification (cost=0.00..2.56 rows=56 width=56) (actual time=0.010..0.025 rows=56 loops=1)

72. 0.005 0.016 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=21) (actual time=0.016..0.016 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
73. 0.011 0.011 ↑ 1.0 7 1

Seq Scan on "POFAnomalyClass" pofanomalyclass (cost=0.00..1.07 rows=7 width=21) (actual time=0.008..0.011 rows=7 loops=1)

74. 0.043 0.086 ↑ 1.0 145 1

Hash (cost=3.45..3.45 rows=145 width=16) (actual time=0.086..0.086 rows=145 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
75. 0.043 0.043 ↑ 1.0 145 1

Seq Scan on "DefectType" defecttype (cost=0.00..3.45 rows=145 width=16) (actual time=0.008..0.043 rows=145 loops=1)

76. 114.917 1,482.731 ↑ 1.0 268,120 1

Hash (cost=67,095.68..67,095.68 rows=268,120 width=32) (actual time=1,482.731..1,482.731 rows=268,120 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 20854kB
77. 926.100 1,367.814 ↑ 1.0 268,120 1

Hash Right Join (cost=12,368.39..67,095.68 rows=268,120 width=32) (actual time=501.600..1,367.814 rows=268,120 loops=1)

  • Hash Cond: ((calcart."CalculationId" = calc."Id") AND (calcart."ArtifactId" = sac."ArtifactId"))
78. 215.208 215.208 ↑ 1.0 2,036,536 1

Seq Scan on "CalculationArtifact" calcart (cost=0.00..39,399.36 rows=2,036,536 width=48) (actual time=0.012..215.208 rows=2,036,536 loops=1)

79. 88.222 226.506 ↑ 1.0 268,120 1

Hash (cost=8,346.59..8,346.59 rows=268,120 width=32) (actual time=226.506..226.506 rows=268,120 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 20854kB
80. 101.595 138.284 ↑ 1.0 268,120 1

Hash Left Join (cost=6.74..8,346.59 rows=268,120 width=32) (actual time=0.118..138.284 rows=268,120 loops=1)

  • Hash Cond: (sac."CalculationId" = calc."Id")
81. 36.598 36.598 ↑ 1.0 268,120 1

Seq Scan on "ActiveCalculation" sac (cost=0.00..4,653.20 rows=268,120 width=32) (actual time=0.010..36.598 rows=268,120 loops=1)

82. 0.042 0.091 ↑ 1.0 166 1

Hash (cost=4.66..4.66 rows=166 width=16) (actual time=0.091..0.091 rows=166 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
83. 0.049 0.049 ↑ 1.0 166 1

Seq Scan on "Calculation" calc (cost=0.00..4.66 rows=166 width=16) (actual time=0.007..0.049 rows=166 loops=1)

84. 0.041 0.081 ↑ 1.0 135 1

Hash (cost=2.35..2.35 rows=135 width=20) (actual time=0.081..0.081 rows=135 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
85. 0.040 0.040 ↑ 1.0 135 1

Seq Scan on "DefectTypeDefectGroupRef" "defectTypeDefectGroupRef" (cost=0.00..2.35 rows=135 width=20) (actual time=0.022..0.040 rows=135 loops=1)

86. 286.540 286.540 ↑ 1.0 1 57,308

Index Scan using "CalculationResult_PK" on "CalculationResult" res (cost=0.43..0.52 rows=1 width=821) (actual time=0.005..0.005 rows=1 loops=57,308)

  • Index Cond: (calcart."Id" = "Id")
87. 17.404 32.409 ↑ 1.0 49,232 1

Hash (cost=1,464.40..1,464.40 rows=49,232 width=92) (actual time=32.409..32.409 rows=49,232 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 6519kB
88. 15.005 15.005 ↑ 1.0 49,232 1

Seq Scan on "DiagnosticObjectCoordinate" diagobjcoord_1 (cost=0.00..1,464.40 rows=49,232 width=92) (actual time=0.023..15.005 rows=49,232 loops=1)

  • Filter: ("CoordinateSystemId" = '72b16dc7-f56e-4203-ba60-7b369f444c88'::uuid)
89. 0.011 0.024 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=29) (actual time=0.024..0.024 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
90. 0.013 0.013 ↑ 1.0 5 1

Seq Scan on "SurfaceLocation" surfacelocation (cost=0.00..1.05 rows=5 width=29) (actual time=0.011..0.013 rows=5 loops=1)

91.          

CTE dmarks

92. 2.813 18.307 ↓ 2.1 182 1

Nested Loop Left Join (cost=482.67..11,288.16 rows=86 width=824) (actual time=6.276..18.307 rows=182 loops=1)

93. 0.199 14.220 ↓ 2.1 182 1

Nested Loop (cost=482.25..11,226.02 rows=86 width=74) (actual time=6.152..14.220 rows=182 loops=1)

  • Join Filter: (mark."SectionId" = sect_2."Id")
94. 2.264 12.019 ↓ 2.1 182 1

Hash Join (cost=481.82..11,081.65 rows=86 width=70) (actual time=6.126..12.019 rows=182 loops=1)

  • Hash Cond: (diagobj_2."Id" = mark."SectionId")
95. 3.754 5.238 ↓ 1.0 15,149 1

Bitmap Heap Scan on "DiagnosticObject" diagobj_2 (cost=189.25..10,636.83 rows=15,139 width=16) (actual time=1.528..5.238 rows=15,149 loops=1)

  • Recheck Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
  • Filter: ("vrDeleted" IS FALSE)
  • Heap Blocks: exact=157
96. 1.484 1.484 ↓ 1.0 15,149 1

Bitmap Index Scan on "IX_DiagnosticSection_DiagnosticTargetId" (cost=0.00..185.47 rows=15,139 width=0) (actual time=1.484..1.484 rows=15,149 loops=1)

  • Index Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
97. 2.426 4.517 ↑ 1.0 8,292 1

Hash (cost=188.92..188.92 rows=8,292 width=54) (actual time=4.517..4.517 rows=8,292 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 832kB
98. 2.091 2.091 ↑ 1.0 8,292 1

Seq Scan on "Marker" mark (cost=0.00..188.92 rows=8,292 width=54) (actual time=0.013..2.091 rows=8,292 loops=1)

99. 2.002 2.002 ↑ 1.0 1 182

Index Scan using "PK_Section" on "Section" sect_2 (cost=0.43..1.67 rows=1 width=36) (actual time=0.010..0.011 rows=1 loops=182)

  • Index Cond: ("Id" = diagobj_2."Id")
100. 1.274 1.274 ↓ 0.0 0 182

Index Scan using "PK_ObjectCoordinate" on "DiagnosticObjectCoordinate" diagnosticobjectcoordinatetable (cost=0.41..0.53 rows=1 width=92) (actual time=0.007..0.007 rows=0 loops=182)

  • Index Cond: (("DiagnosticObjectId" = diagobj_2."Id") AND ("CoordinateSystemId" = '72b16dc7-f56e-4203-ba60-7b369f444c88'::uuid))
101. 1.462 11,406.633 ↑ 572.6 200 1

Result (cost=21,842.51..195,484,787.09 rows=114,527 width=884) (actual time=11,359.642..11,406.633 rows=200 loops=1)

102. 58.051 11,349.571 ↑ 572.6 200 1

Sort (cost=21,842.51..22,128.82 rows=114,527 width=812) (actual time=11,349.493..11,349.571 rows=200 loops=1)

  • Sort Key: "*SELECT* 1"."Distance", "*SELECT* 1"."Order
  • Sort Method: top-N heapsort Memory: 111kB
103. 186.594 11,291.520 ↑ 1.6 72,639 1

WindowAgg (cost=13,170.61..16,892.73 rows=114,527 width=812) (actual time=11,241.969..11,291.520 rows=72,639 loops=1)

104. 400.212 11,104.926 ↑ 1.6 72,639 1

HashAggregate (cost=13,170.61..14,315.88 rows=114,527 width=804) (actual time=11,004.687..11,104.926 rows=72,639 loops=1)

  • Group Key: "*SELECT* 1"."ObjectType", "*SELECT* 1"."ObjectTypePOF", "*SELECT* 1"."Order", "*SELECT* 1"."Distance", "*SELECT* 1"."Number", "*SELECT* 1"."Description", "*SELECT* 1"."DescriptionPOF", "*SELECT* 1"."SectNumber", "*SELECT* 1"."PipeType", "*SELECT* 1"."SectionLength", "*SELECT* 1"."AxialWeldStartAngle", "*SELECT* 1"."AverageWallThickness", "*SELECT* 1"."MeasuredDepth", "*SELECT* 1"."MeasuredDepthInPercent", "*SELECT* 1"."MeasuredLength", "*SELECT* 1"."MeasuredWidth", "*SELECT* 1"."EffectiveLength", "*SELECT* 1"."AngularPosition", "*SELECT* 1"."KeypointAngularPosition", "*SELECT* 1"."PrevDistance", "*SELECT* 1"."NextDistance", "*SELECT* 1"."AxialWeldDistance", "*SELECT* 1"."ERF", "*SELECT* 1"."Psw", "*SELECT* 1"."Danger", "*SELECT* 1"."Lat", "*SELECT* 1"."Lon", "*SELECT* 1"."Alt", "*SELECT* 1"."SurfaceLocation", "*SELECT* 1"."DepthInPercent", (("*SELECT* 1"."KeypointDistance")::double precision), "*SELECT* 1"."SizeCategory", "*SELECT* 1"."Coordinates
105. 20.148 10,704.714 ↑ 1.6 72,639 1

Append (cost=0.00..3,722.13 rows=114,527 width=804) (actual time=46.227..10,704.714 rows=72,639 loops=1)

106. 12.126 580.035 ↓ 1.0 15,149 1

Subquery Scan on *SELECT* 1 (cost=0.00..487.14 rows=14,989 width=804) (actual time=46.227..580.035 rows=15,149 loops=1)

107. 567.909 567.909 ↓ 1.0 15,149 1

CTE Scan on dobjects (cost=0.00..299.78 rows=14,989 width=828) (actual time=46.223..567.909 rows=15,149 loops=1)

108. 63.866 10,085.637 ↑ 1.7 57,308 1

Subquery Scan on *SELECT* 2 (cost=0.00..3,232.19 rows=99,452 width=804) (actual time=5,640.154..10,085.637 rows=57,308 loops=1)

109. 10,021.771 10,021.771 ↑ 1.7 57,308 1

CTE Scan on darts (cost=0.00..1,989.04 rows=99,452 width=800) (actual time=5,640.146..10,021.771 rows=57,308 loops=1)

110. 0.166 18.894 ↓ 2.1 182 1

Subquery Scan on *SELECT* 3 (cost=0.00..2.79 rows=86 width=804) (actual time=6.287..18.894 rows=182 loops=1)

111. 18.728 18.728 ↓ 2.1 182 1

CTE Scan on dmarks (cost=0.00..1.72 rows=86 width=828) (actual time=6.281..18.728 rows=182 loops=1)

112.          

SubPlan (forResult)

113. 0.200 17.200 ↑ 1.0 1 200

Limit (cost=426.67..426.67 rows=1 width=8) (actual time=0.086..0.086 rows=1 loops=200)

114. 0.400 17.000 ↑ 5,333.0 1 200

Sort (cost=426.67..440.00 rows=5,333 width=8) (actual time=0.085..0.085 rows=1 loops=200)

  • Sort Key: marker."MarkerDistanse" DESC
  • Sort Method: quicksort Memory: 25kB
115. 16.600 16.600 ↑ 5,333.0 1 200

CTE Scan on marker (cost=0.00..400.00 rows=5,333 width=8) (actual time=0.054..0.083 rows=1 loops=200)

  • Filter: (("*SELECT* 1"."Distance")::real > "MarkerDistanse")
  • Rows Removed by Filter: 181
116. 0.200 7.400 ↑ 1.0 1 200

Limit (cost=426.67..426.67 rows=1 width=4) (actual time=0.037..0.037 rows=1 loops=200)

117. 0.200 7.200 ↑ 5,333.0 1 200

Sort (cost=426.67..440.00 rows=5,333 width=4) (actual time=0.036..0.036 rows=1 loops=200)

  • Sort Key: marker_1."MarkerDistanse" DESC
  • Sort Method: quicksort Memory: 25kB
118. 7.000 7.000 ↑ 5,333.0 1 200

CTE Scan on marker marker_1 (cost=0.00..400.00 rows=5,333 width=4) (actual time=0.005..0.035 rows=1 loops=200)

  • Filter: (("*SELECT* 1"."Distance")::real > "MarkerDistanse")
  • Rows Removed by Filter: 181
119. 0.200 16.000 ↑ 1.0 1 200

Limit (cost=426.67..426.67 rows=1 width=8) (actual time=0.080..0.080 rows=1 loops=200)

120. 6.000 15.800 ↑ 5,333.0 1 200

Sort (cost=426.67..440.00 rows=5,333 width=8) (actual time=0.079..0.079 rows=1 loops=200)

  • Sort Key: marker_2."MarkerDistanse
  • Sort Method: top-N heapsort Memory: 25kB
121. 9.800 9.800 ↑ 29.5 181 200

CTE Scan on marker marker_2 (cost=0.00..400.00 rows=5,333 width=8) (actual time=0.001..0.049 rows=181 loops=200)

  • Filter: (("*SELECT* 1"."Distance")::real < "MarkerDistanse")
  • Rows Removed by Filter: 1
122. 0.200 15.000 ↑ 1.0 1 200

Limit (cost=426.67..426.67 rows=1 width=4) (actual time=0.075..0.075 rows=1 loops=200)

123. 5.600 14.800 ↑ 5,333.0 1 200

Sort (cost=426.67..440.00 rows=5,333 width=4) (actual time=0.074..0.074 rows=1 loops=200)

  • Sort Key: marker_3."MarkerDistanse
  • Sort Method: top-N heapsort Memory: 25kB
124. 9.200 9.200 ↑ 29.5 181 200

CTE Scan on marker marker_3 (cost=0.00..400.00 rows=5,333 width=4) (actual time=0.001..0.046 rows=181 loops=200)

  • Filter: (("*SELECT* 1"."Distance")::real < "MarkerDistanse")
  • Rows Removed by Filter: 1