explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jro3 : Optimization for: plan #VQxf

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.029 30,812.994 ↑ 1.0 200 1

Limit (cost=186,560,990.37..186,902,329.87 rows=200 width=908) (actual time=30,765.049..30,812.994 rows=200 loops=1)

2.          

CTE sections

3. 12.789 142.640 ↓ 1.0 15,149 1

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

4. 13.389 129.851 ↓ 1.0 15,149 1

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

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

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

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

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

7. 3.444 4.662 ↓ 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.662 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.004..0.005 rows=1 loops=15,149)

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

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

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

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

12.          

CTE marker

13. 2.278 9.545 ↑ 87.9 182 1

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

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

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

15. 2.911 4.956 ↑ 1.0 8,292 1

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

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

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

17. 1.403 30,812.965 ↑ 572.6 200 1

Result (cost=186,520,674.36..381,983,618.95 rows=114,527 width=908) (actual time=30,765.044..30,812.965 rows=200 loops=1)

18. 59.575 30,764.762 ↑ 572.6 200 1

Sort (cost=186,520,674.36..186,520,960.68 rows=114,527 width=836) (actual time=30,764.689..30,764.762 rows=200 loops=1)

  • Sort Key: "*SELECT* 1"."Distance", (1)
  • Sort Method: top-N heapsort Memory: 112kB
19. 150.052 30,705.187 ↑ 1.6 72,639 1

WindowAgg (cost=186,512,002.46..186,515,724.59 rows=114,527 width=836) (actual time=30,653.232..30,705.187 rows=72,639 loops=1)

20. 473.389 30,555.135 ↑ 1.6 72,639 1

HashAggregate (cost=186,512,002.46..186,513,147.73 rows=114,527 width=828) (actual time=30,454.150..30,555.135 rows=72,639 loops=1)

  • Group Key: "*SELECT* 1"."ObjectType", "*SELECT* 1"."ObjectTypePOF", (1), "*SELECT* 1"."Distance", "*SELECT* 1"."Number", (''::text), (''::text), "*SELECT* 1"."SectNumber", "*SELECT* 1"."PipeType", "*SELECT* 1"."SectionLength", "*SELECT* 1"."AxialWeldStartAngle", "*SELECT* 1"."AverageWallThickness", (''::text), (NULL::numeric), (''::text), (''::text), (''::text), (''::text), (''::text), (NULL::double precision), "*SELECT* 1"."NextDistance", (NULL::double precision), (NULL::double precision), "*SELECT* 1"."Psw", (NULL::integer), "*SELECT* 1"."Lat", "*SELECT* 1"."Lon", "*SELECT* 1"."Alt", (NULL::integer), (NULL::double precision), (NULL::integer), (NULL::double precision), (NULL::text), (NULL::numeric), ((NULL::numeric)::double precision), (NULL::text), "*SELECT* 1"."Coordinates
21. 18.308 30,081.746 ↑ 1.6 72,639 1

Append (cost=2,272.13..186,501,408.71 rows=114,527 width=828) (actual time=40.312..30,081.746 rows=72,639 loops=1)

22. 14.289 497.160 ↓ 1.0 15,149 1

Subquery Scan on *SELECT* 1 (cost=2,272.13..48,843.53 rows=14,989 width=790) (actual time=40.312..497.160 rows=15,149 loops=1)

23. 189.615 482.871 ↓ 1.0 15,149 1

Hash Left Join (cost=2,272.13..48,656.17 rows=14,989 width=814) (actual time=40.307..482.871 rows=15,149 loops=1)

  • Hash Cond: (sect."Id" = diagobjcoord."DiagnosticObjectId")
24. 8.230 255.709 ↓ 1.0 15,149 1

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

  • Hash Cond: (sect."PipeTypeId" = pt."Id")
25. 12.550 247.448 ↓ 1.0 15,149 1

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

26. 11.906 144.004 ↓ 1.0 15,149 1

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

  • Hash Cond: (sect."SectionTypeId" = st."Id")
27. 17.951 132.078 ↓ 1.0 15,149 1

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

28. 6.115 8.084 ↓ 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.018..8.084 rows=15,149 loops=1)

  • Recheck Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
  • Filter: ("vrDeleted" IS FALSE)
  • Heap Blocks: exact=157
29. 1.969 1.969 ↓ 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.969..1.969 rows=15,149 loops=1)

  • Index Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
30. 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")
31. 0.009 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
32. 0.011 0.011 ↑ 1.0 5 1

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

33. 90.894 90.894 ↑ 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.006..0.006 rows=1 loops=15,149)

  • Index Cond: ("Id" = sect."Id")
34. 0.025 0.031 ↑ 1.0 5 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
35. 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)

36. 19.628 37.547 ↑ 1.0 49,232 1

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

  • Buckets: 65536 Batches: 1 Memory Usage: 6519kB
37. 17.919 17.919 ↑ 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..17.919 rows=49,232 loops=1)

  • Filter: ("CoordinateSystemId" = '72b16dc7-f56e-4203-ba60-7b369f444c88'::uuid)
38. 135.549 29,548.328 ↑ 1.7 57,308 1

Subquery Scan on *SELECT* 2 (cost=114,218.24..186,441,275.95 rows=99,452 width=780) (actual time=5,530.150..29,548.328 rows=57,308 loops=1)

39. 2,197.391 29,412.779 ↑ 1.7 57,308 1

Hash Left Join (cost=114,218.24..186,439,535.54 rows=99,452 width=824) (actual time=5,530.137..29,412.779 rows=57,308 loops=1)

  • Hash Cond: (artmeas."SurfaceLocationId" = surfacelocation."Id")
40. 38.872 8,017.188 ↑ 1.7 57,308 1

Hash Left Join (cost=114,217.13..749,597.35 rows=99,452 width=1,403) (actual time=5,519.851..8,017.188 rows=57,308 loops=1)

  • Hash Cond: (sect_1."Id" = diagobjcoord_1."DiagnosticObjectId")
41. 60.024 7,947.751 ↑ 1.7 57,308 1

Nested Loop Left Join (cost=112,137.33..747,110.75 rows=99,452 width=1,343) (actual time=5,488.810..7,947.751 rows=57,308 loops=1)

42. 38.961 7,887.727 ↑ 1.7 57,308 1

Hash Left Join (cost=112,136.90..693,914.92 rows=99,452 width=554) (actual time=5,488.796..7,887.727 rows=57,308 loops=1)

  • Hash Cond: (artifactaddonpof."POFAnomalyClassId" = pofanomalyclass."Id")
43. 48.729 7,848.747 ↑ 1.7 57,308 1

Hash Left Join (cost=112,135.75..692,680.03 rows=99,452 width=565) (actual time=5,488.765..7,848.747 rows=57,308 loops=1)

  • Hash Cond: (artifactclass."DefectTypeId" = defecttype."Id")
44. 61.574 7,799.777 ↑ 1.7 57,308 1

Hash Left Join (cost=112,124.55..691,612.45 rows=99,452 width=577) (actual time=5,488.481..7,799.777 rows=57,308 loops=1)

  • Hash Cond: (artifact."Id" = sac."ArtifactId")
45. 41.431 6,393.453 ↑ 1.7 57,308 1

Hash Left Join (cost=43,995.11..623,086.35 rows=99,452 width=577) (actual time=4,141.936..6,393.453 rows=57,308 loops=1)

  • Hash Cond: (artifactaddonpof."POFArtifactIdentification" = pofartifactidentification."Id")
46. 59.571 6,351.976 ↑ 1.7 57,308 1

Nested Loop Left Join (cost=43,991.85..621,723.72 rows=99,452 width=553) (actual time=4,141.878..6,351.976 rows=57,308 loops=1)

47. 42.547 5,833.941 ↑ 1.7 57,308 1

Hash Left Join (cost=43,991.42..571,135.98 rows=99,452 width=308) (actual time=4,141.852..5,833.941 rows=57,308 loops=1)

  • Hash Cond: (artifactaddonpof."POFArtifactTypeId" = pofartifacttype."Id")
48. 24.821 5,791.369 ↑ 1.7 57,308 1

Nested Loop Left Join (cost=43,989.97..569,767.07 rows=99,452 width=295) (actual time=4,141.813..5,791.369 rows=57,308 loops=1)

49. 40.898 5,250.776 ↑ 1.7 57,308 1

Hash Left Join (cost=43,989.53..521,217.64 rows=99,452 width=247) (actual time=4,141.782..5,250.776 rows=57,308 loops=1)

  • Hash Cond: (artifact."ClassId" = artifactclass."Id")
50. 34.918 5,209.677 ↑ 1.7 57,308 1

Hash Left Join (cost=43,979.78..519,840.43 rows=99,452 width=191) (actual time=4,141.567..5,209.677 rows=57,308 loops=1)

  • Hash Cond: (pipelinesect."PipeInstallationId" = pipeinstallation."Id")
51. 90.400 5,174.745 ↑ 1.7 57,308 1

Nested Loop Left Join (cost=43,940.52..519,426.96 rows=99,452 width=203) (actual time=4,141.514..5,174.745 rows=57,308 loops=1)

52. 2,774.040 4,453.957 ↑ 1.7 57,308 1

Hash Join (cost=43,940.08..471,456.03 rows=99,452 width=161) (actual time=4,141.461..4,453.957 rows=57,308 loops=1)

  • Hash Cond: (artifact."DiagnosticObjectId" = diagobj_1."Id")
53. 1,336.220 1,336.220 ↑ 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.015..1,336.220 rows=9,530,948 loops=1)

54. 10.452 343.697 ↓ 1.0 15,149 1

Hash (cost=43,750.84..43,750.84 rows=15,139 width=104) (actual time=343.697..343.697 rows=15,149 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1845kB
55. 14.807 333.245 ↓ 1.0 15,149 1

Nested Loop Left Join (cost=10,830.98..43,750.84 rows=15,139 width=104) (actual time=134.191..333.245 rows=15,149 loops=1)

56. 6.252 257.842 ↓ 1.0 15,149 1

Nested Loop Left Join (cost=10,830.55..36,772.87 rows=15,139 width=104) (actual time=134.171..257.842 rows=15,149 loops=1)

57. 6.294 175.845 ↓ 1.0 15,149 1

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

  • Hash Cond: (diagobj_1."DiagnosticTargetId" = "innerDiagnosticTarget"."Id")
58. 11.266 169.491 ↓ 1.0 15,149 1

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

  • Hash Cond: (sections."Id" = diagobj_1."Id")
59. 149.381 149.381 ↓ 1.0 15,149 1

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

60. 3.673 8.844 ↓ 1.0 15,149 1

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

  • Buckets: 16384 Batches: 1 Memory Usage: 1075kB
61. 3.639 5.171 ↓ 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.572..5.171 rows=15,149 loops=1)

  • Recheck Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
  • Filter: ("vrDeleted" IS FALSE)
  • Heap Blocks: exact=157
62. 1.532 1.532 ↓ 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.532..1.532 rows=15,149 loops=1)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
64. 0.026 0.059 ↑ 1.0 1 1

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

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

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

66. 0.004 0.017 ↑ 1.0 1 1

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

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

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

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

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

  • Index Cond: ("Id" = diagobj_1."Id")
69. 60.596 60.596 ↑ 1.0 1 15,149

Index Scan using "PK_Section" on "Section" pipelinesect (cost=0.42..0.45 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=15,149)

  • Index Cond: ("Id" = sect_1."PipelineSectionId")
70. 630.388 630.388 ↑ 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.011..0.011 rows=1 loops=57,308)

  • Index Cond: ("Id" = artifact."Id")
71. 0.000 0.014 ↓ 0.0 0 1

Hash (cost=29.89..29.89 rows=750 width=20) (actual time=0.014..0.014 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
72. 0.002 0.014 ↓ 0.0 0 1

Hash Left Join (cost=2.08..29.89 rows=750 width=20) (actual time=0.014..0.014 rows=0 loops=1)

  • Hash Cond: (pipeinstallation."ConstructiveDiameterId" = constructivediameter."Id")
73. 0.012 0.012 ↓ 0.0 0 1

Seq Scan on "PipeInstallation" pipeinstallation (cost=0.00..17.50 rows=750 width=20) (actual time=0.012..0.012 rows=0 loops=1)

74. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.48..1.48 rows=48 width=8) (never executed)

75. 0.000 0.000 ↓ 0.0 0

Seq Scan on "ConstructiveDiameter" constructivediameter (cost=0.00..1.48 rows=48 width=8) (never executed)

76. 0.122 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
77. 0.079 0.079 ↑ 1.0 211 1

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

78. 515.772 515.772 ↑ 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.009 rows=1 loops=57,308)

  • Index Cond: ("Id" = artifact."Id")
79. 0.012 0.025 ↑ 1.0 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
80. 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.008..0.013 rows=20 loops=1)

81. 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")
82. 0.022 0.046 ↑ 1.0 56 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
83. 0.024 0.024 ↑ 1.0 56 1

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

84. 79.135 1,344.750 ↑ 1.0 228,709 1

Hash (cost=65,270.58..65,270.58 rows=228,709 width=32) (actual time=1,344.750..1,344.750 rows=228,709 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 16343kB
85. 871.903 1,265.615 ↑ 1.0 228,709 1

Hash Right Join (cost=10,551.21..65,270.58 rows=228,709 width=32) (actual time=460.345..1,265.615 rows=228,709 loops=1)

  • Hash Cond: ((calcart."CalculationId" = calc."Id") AND (calcart."ArtifactId" = sac."ArtifactId"))
86. 212.336 212.336 ↑ 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.013..212.336 rows=2,036,536 loops=1)

87. 65.444 181.376 ↑ 1.0 228,709 1

Hash (cost=7,120.57..7,120.57 rows=228,709 width=32) (actual time=181.376..181.376 rows=228,709 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 16343kB
88. 87.986 115.932 ↑ 1.0 228,709 1

Hash Left Join (cost=6.74..7,120.57 rows=228,709 width=32) (actual time=0.130..115.932 rows=228,709 loops=1)

  • Hash Cond: (sac."CalculationId" = calc."Id")
89. 27.856 27.856 ↑ 1.0 228,709 1

Seq Scan on "ActiveCalculation" sac (cost=0.00..3,969.09 rows=228,709 width=32) (actual time=0.012..27.856 rows=228,709 loops=1)

90. 0.043 0.090 ↑ 1.0 166 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
91. 0.047 0.047 ↑ 1.0 166 1

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

92. 0.042 0.241 ↑ 1.0 145 1

Hash (cost=9.38..9.38 rows=145 width=20) (actual time=0.241..0.241 rows=145 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
93. 0.078 0.199 ↑ 1.0 145 1

Hash Left Join (cost=4.04..9.38 rows=145 width=20) (actual time=0.135..0.199 rows=145 loops=1)

  • Hash Cond: (defecttype."Id" = "defectTypeDefectGroupRef"."DefectTypeId")
94. 0.038 0.038 ↑ 1.0 145 1

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

95. 0.051 0.083 ↑ 1.0 135 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
96. 0.032 0.032 ↑ 1.0 135 1

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

97. 0.009 0.019 ↑ 1.0 7 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
98. 0.010 0.010 ↑ 1.0 7 1

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

99. 0.000 0.000 ↓ 0.0 0 57,308

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

  • Index Cond: (calcart."Id" = "Id")
100. 16.787 30.565 ↑ 1.0 49,232 1

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

  • Buckets: 65536 Batches: 1 Memory Usage: 6519kB
101. 13.778 13.778 ↑ 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.012..13.778 rows=49,232 loops=1)

  • Filter: ("CoordinateSystemId" = '72b16dc7-f56e-4203-ba60-7b369f444c88'::uuid)
102. 0.009 0.020 ↑ 1.0 5 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
103. 0.011 0.011 ↑ 1.0 5 1

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

104.          

SubPlan (forHash Left Join)

105. 114.616 5,329.644 ↑ 1.0 1 57,308

Limit (cost=466.67..466.67 rows=1 width=8) (actual time=0.092..0.093 rows=1 loops=57,308)

106. 1,260.776 5,215.028 ↑ 5,333.0 1 57,308

Sort (cost=466.67..480.00 rows=5,333 width=8) (actual time=0.091..0.091 rows=1 loops=57,308)

  • Sort Key: marker_4."MarkerDistanse" DESC
  • Sort Method: top-N heapsort Memory: 25kB
107. 3,954.252 3,954.252 ↑ 50.3 106 57,308

CTE Scan on marker marker_4 (cost=0.00..440.00 rows=5,333 width=8) (actual time=0.002..0.069 rows=106 loops=57,308)

  • Filter: (((sect_1."Distance")::real + artmeas."Distance") > "MarkerDistanse")
  • Rows Removed by Filter: 76
108. 57.308 4,871.180 ↑ 1.0 1 57,308

Limit (cost=466.67..466.67 rows=1 width=4) (actual time=0.085..0.085 rows=1 loops=57,308)

109. 1,031.544 4,813.872 ↑ 5,333.0 1 57,308

Sort (cost=466.67..480.00 rows=5,333 width=4) (actual time=0.084..0.084 rows=1 loops=57,308)

  • Sort Key: marker_5."MarkerDistanse" DESC
  • Sort Method: top-N heapsort Memory: 25kB
110. 3,782.328 3,782.328 ↑ 50.3 106 57,308

CTE Scan on marker marker_5 (cost=0.00..440.00 rows=5,333 width=4) (actual time=0.001..0.066 rows=106 loops=57,308)

  • Filter: (((sect_1."Distance")::real + artmeas."Distance") > "MarkerDistanse")
  • Rows Removed by Filter: 76
111. 57.308 4,584.640 ↑ 1.0 1 57,308

Limit (cost=466.67..466.67 rows=1 width=8) (actual time=0.080..0.080 rows=1 loops=57,308)

112. 802.312 4,527.332 ↑ 5,333.0 1 57,308

Sort (cost=466.67..480.00 rows=5,333 width=8) (actual time=0.079..0.079 rows=1 loops=57,308)

  • Sort Key: marker_6."MarkerDistanse
  • Sort Method: quicksort Memory: 25kB
113. 3,725.020 3,725.020 ↑ 70.2 76 57,308

CTE Scan on marker marker_6 (cost=0.00..440.00 rows=5,333 width=8) (actual time=0.034..0.065 rows=76 loops=57,308)

  • Filter: (((sect_1."Distance")::real + artmeas."Distance") < "MarkerDistanse")
  • Rows Removed by Filter: 106
114. 57.308 4,412.716 ↑ 1.0 1 57,308

Limit (cost=466.67..466.67 rows=1 width=4) (actual time=0.077..0.077 rows=1 loops=57,308)

115. 745.004 4,355.408 ↑ 5,333.0 1 57,308

Sort (cost=466.67..480.00 rows=5,333 width=4) (actual time=0.076..0.076 rows=1 loops=57,308)

  • Sort Key: marker_7."MarkerDistanse
  • Sort Method: quicksort Memory: 25kB
116. 3,610.404 3,610.404 ↑ 70.2 76 57,308

CTE Scan on marker marker_7 (cost=0.00..440.00 rows=5,333 width=4) (actual time=0.034..0.063 rows=76 loops=57,308)

  • Filter: (((sect_1."Distance")::real + artmeas."Distance") < "MarkerDistanse")
  • Rows Removed by Filter: 106
117. 0.161 17.950 ↓ 2.1 182 1

Subquery Scan on *SELECT* 3 (cost=482.67..11,289.24 rows=86 width=824) (actual time=6.411..17.950 rows=182 loops=1)

118. 2.691 17.789 ↓ 2.1 182 1

Nested Loop Left Join (cost=482.67..11,288.16 rows=86 width=848) (actual time=6.407..17.789 rows=182 loops=1)

119. 0.281 14.188 ↓ 2.1 182 1

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

  • Join Filter: (mark."SectionId" = sect_2."Id")
120. 2.227 12.087 ↓ 2.1 182 1

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

  • Hash Cond: (diagobj_2."Id" = mark."SectionId")
121. 3.772 5.268 ↓ 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.539..5.268 rows=15,149 loops=1)

  • Recheck Cond: ("DiagnosticTargetId" = '6847248f-37c1-4f72-ad7a-357e4491c28a'::uuid)
  • Filter: ("vrDeleted" IS FALSE)
  • Heap Blocks: exact=157
122. 1.496 1.496 ↓ 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.496..1.496 rows=15,149 loops=1)

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

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

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

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

125. 1.820 1.820 ↑ 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.010 rows=1 loops=182)

  • Index Cond: ("Id" = diagobj_2."Id")
126. 0.910 0.910 ↓ 0.0 0 182

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

  • Index Cond: (("DiagnosticObjectId" = diagobj_2."Id") AND ("CoordinateSystemId" = '72b16dc7-f56e-4203-ba60-7b369f444c88'::uuid))
127.          

SubPlan (forResult)

128. 0.200 7.600 ↑ 1.0 1 200

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

129. 0.400 7.400 ↑ 5,333.0 1 200

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

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

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

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

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

132. 0.400 8.000 ↑ 5,333.0 1 200

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

  • Sort Key: marker_1."MarkerDistanse" DESC
  • Sort Method: quicksort Memory: 25kB
133. 7.600 7.600 ↑ 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.038 rows=1 loops=200)

  • Filter: (("*SELECT* 1"."Distance")::real > "MarkerDistanse")
  • Rows Removed by Filter: 181
134. 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)

135. 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
136. 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
137. 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)

138. 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
139. 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