explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bcbr

Settings
# exclusive inclusive rows x rows loops node
1. 2.553 3,093.733 ↑ 1.0 6,980 1

Unique (cost=16,218.42..16,410.37 rows=6,980 width=202) (actual time=3,086.495..3,093.733 rows=6,980 loops=1)

2. 20.859 3,091.180 ↑ 1.0 6,980 1

Sort (cost=16,218.42..16,235.87 rows=6,980 width=202) (actual time=3,086.494..3,091.180 rows=6,980 loops=1)

  • Sort Key: dependency.name, dependency.version, dependency.id, dependency.normalized_name, dependency.location, dependency.maven_version, dependency.origin, dependency.license, dependency.type, (string_agg((cve.id)::
  • Sort Method: external merge Disk: 5,224kB
3. 432.499 3,070.321 ↑ 1.0 6,980 1

GroupAggregate (cost=15,233.78..15,772.78 rows=6,980 width=202) (actual time=2,395.990..3,070.321 rows=6,980 loops=1)

  • Group Key: dependency.id
4. 1,253.973 2,637.822 ↓ 45.2 1,633,879 1

Sort (cost=15,233.78..15,324.13 rows=36,140 width=174) (actual time=2,394.551..2,637.822 rows=1,633,879 loops=1)

  • Sort Key: dependency.id
  • Sort Method: external merge Disk: 250,136kB
5. 313.912 1,383.849 ↓ 45.2 1,633,879 1

Hash Anti Join (cost=3,209.01..9,407.25 rows=36,140 width=174) (actual time=95.601..1,383.849 rows=1,633,879 loops=1)

  • Hash Cond: (cve.id = cve_filter_project.cve_id)
6. 523.325 1,069.928 ↓ 45.2 1,633,879 1

Hash Left Join (cost=3,199.48..8,941.32 rows=36,175 width=174) (actual time=95.576..1,069.928 rows=1,633,879 loops=1)

  • Hash Cond: (image.id = project_image_1.image_id)
  • Filter: ((project.id = 1) OR (image_dependency.image_id IS NULL))
7. 441.885 546.484 ↓ 11.3 1,633,879 1

Hash Right Join (cost=3,192.46..6,867.14 rows=144,701 width=182) (actual time=95.444..546.484 rows=1,633,879 loops=1)

  • Hash Cond: (image_dependency_1.dependency_id = dependency.id)
8. 7.499 10.049 ↓ 1.0 28,436 1

Hash Join (cost=29.54..878.22 rows=28,113 width=8) (actual time=0.235..10.049 rows=28,436 loops=1)

  • Hash Cond: (image_dependency_1.image_id = image.id)
9. 2.336 2.336 ↑ 1.0 28,041 1

Seq Scan on image_dependency image_dependency_1 (cost=0.00..462.13 rows=28,113 width=8) (actual time=0.007..2.336 rows=28,041 loops=1)

10. 0.035 0.214 ↓ 1.0 212 1

Hash (cost=26.91..26.91 rows=210 width=4) (actual time=0.214..0.214 rows=212 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
11. 0.063 0.179 ↓ 1.0 212 1

Hash Right Join (cost=13.92..26.91 rows=210 width=4) (actual time=0.099..0.179 rows=212 loops=1)

  • Hash Cond: (imagetag.image_id = image.id)
12. 0.036 0.036 ↓ 1.4 212 1

Seq Scan on imagetag (cost=0.00..12.57 rows=157 width=4) (actual time=0.004..0.036 rows=212 loops=1)

13. 0.030 0.080 ↑ 1.0 210 1

Hash (cost=11.29..11.29 rows=210 width=4) (actual time=0.080..0.080 rows=210 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
14. 0.050 0.050 ↑ 1.0 210 1

Index Only Scan using pk_image on image (cost=0.14..11.29 rows=210 width=4) (actual time=0.033..0.050 rows=210 loops=1)

  • Heap Fetches: 0
15. 26.968 94.550 ↓ 2.0 72,156 1

Hash (cost=1,800.83..1,800.83 rows=35,927 width=178) (actual time=94.550..94.550 rows=72,156 loops=1)

  • Buckets: 32,768 Batches: 4 Memory Usage: 3,865kB
16. 25.127 67.582 ↓ 2.0 72,156 1

Hash Right Join (cost=874.01..1,800.83 rows=35,927 width=178) (actual time=40.170..67.582 rows=72,156 loops=1)

  • Hash Cond: (image_dependency.dependency_id = dependency.id)
17. 2.690 2.690 ↑ 1.0 28,041 1

Seq Scan on image_dependency (cost=0.00..462.13 rows=28,113 width=8) (actual time=0.011..2.690 rows=28,041 loops=1)

18. 7.711 39.765 ↓ 1.7 15,039 1

Hash (cost=762.51..762.51 rows=8,920 width=174) (actual time=39.765..39.765 rows=15,039 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 2,634kB
19. 7.546 32.054 ↓ 1.7 15,039 1

Hash Right Join (cost=538.42..762.51 rows=8,920 width=174) (actual time=19.027..32.054 rows=15,039 loops=1)

  • Hash Cond: (dependency_cve_1.dependency_id = dependency.id)
20. 4.240 7.815 ↓ 1.0 9,043 1

Hash Join (cost=214.37..415.03 rows=8,920 width=8) (actual time=2.155..7.815 rows=9,043 loops=1)

  • Hash Cond: (dependency_cve_1.cve_id = cve.id)
21. 1.513 1.513 ↓ 1.0 9,043 1

Seq Scan on dependency_cve dependency_cve_1 (cost=0.00..177.20 rows=8,920 width=8) (actual time=0.022..1.513 rows=9,043 loops=1)

22. 0.934 2.062 ↑ 1.0 2,061 1

Hash (cost=188.61..188.61 rows=2,061 width=4) (actual time=2.062..2.062 rows=2,061 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 105kB
23. 1.128 1.128 ↑ 1.0 2,061 1

Seq Scan on cve (cost=0.00..188.61 rows=2,061 width=4) (actual time=0.022..1.128 rows=2,061 loops=1)

24. 9.439 16.693 ↑ 1.0 6,980 1

Hash (cost=236.80..236.80 rows=6,980 width=170) (actual time=16.693..16.693 rows=6,980 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 1,115kB
25. 7.254 7.254 ↑ 1.0 6,980 1

Seq Scan on dependency (cost=0.00..236.80 rows=6,980 width=170) (actual time=0.034..7.254 rows=6,980 loops=1)

26. 0.032 0.119 ↓ 1.2 210 1

Hash (cost=4.81..4.81 rows=177 width=8) (actual time=0.119..0.119 rows=210 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
27. 0.062 0.087 ↓ 1.2 210 1

Hash Join (cost=1.09..4.81 rows=177 width=8) (actual time=0.022..0.087 rows=210 loops=1)

  • Hash Cond: (project_image_1.project_id = project.id)
28. 0.019 0.019 ↓ 1.2 210 1

Seq Scan on project_image project_image_1 (cost=0.00..2.77 rows=177 width=8) (actual time=0.006..0.019 rows=210 loops=1)

29. 0.002 0.006 ↑ 4.0 1 1

Hash (cost=1.04..1.04 rows=4 width=4) (actual time=0.006..0.006 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
30. 0.004 0.004 ↑ 4.0 1 1

Seq Scan on project (cost=0.00..1.04 rows=4 width=4) (actual time=0.004..0.004 rows=1 loops=1)

31. 0.000 0.009 ↓ 0.0 0 1

Hash (cost=9.50..9.50 rows=2 width=4) (actual time=0.009..0.009 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
32. 0.002 0.009 ↓ 0.0 0 1

Bitmap Heap Scan on cve_filter_project (cost=4.16..9.50 rows=2 width=4) (actual time=0.009..0.009 rows=0 loops=1)

  • Recheck Cond: (project_id = 1)
33. 0.007 0.007 ↓ 0.0 0 1

Bitmap Index Scan on pk_cve_filter_project (cost=0.00..4.16 rows=2 width=0) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: (project_id = 1)
Planning time : 8.803 ms
Execution time : 3,174.922 ms