explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yaik

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 240.949 ↓ 0.0 0 1

Hash Join (cost=345,607.56..345,778.96 rows=1 width=4) (actual time=240.949..240.949 rows=0 loops=1)

  • Hash Cond: (lfs_objects_projects.lfs_object_id = lfs_objects.id)
  • Buffers: shared hit=10,256
2. 0.005 240.293 ↑ 1,942.4 5 1

Unique (cost=345,592.69..345,641.49 rows=9,712 width=4) (actual time=240.288..240.293 rows=5 loops=1)

  • Buffers: shared hit=10,046
3. 0.018 240.288 ↑ 1,951.8 5 1

Sort (cost=345,592.69..345,617.09 rows=9,759 width=4) (actual time=240.287..240.288 rows=5 loops=1)

  • Sort Key: lfs_objects_projects.lfs_object_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=10,046
4. 227.448 240.270 ↑ 1,951.8 5 1

Hash Semi Join (cost=221,414.54..344,946.04 rows=9,759 width=4) (actual time=74.029..240.270 rows=5 loops=1)

  • Hash Cond: (lfs_objects_projects.project_id = projects.id)
  • Buffers: shared hit=10,046
5. 8.245 8.245 ↓ 2.5 24,256 1

Index Only Scan using test_index on public.lfs_objects_projects (cost=0.56..464.48 rows=9,759 width=8) (actual time=0.030..8.245 rows=24,256 loops=1)

  • Index Cond: ((lfs_objects_projects.lfs_object_id >= 1) AND (lfs_objects_projects.lfs_object_id <= 1,000))
  • Heap Fetches: 158
  • Buffers: shared hit=7,577
6. 1.264 4.577 ↑ 7,065.0 1,110 1

Hash (cost=851.63..851.63 rows=7,842,108 width=4) (actual time=4.577..4.577 rows=1,110 loops=1)

  • Buckets: 4,194,304 Batches: 8 Memory Usage: 32,825kB
  • Buffers: shared hit=2,469
7. 0.420 3.313 ↑ 7,065.0 1,110 1

Nested Loop (cost=318.19..851.63 rows=7,842,108 width=4) (actual time=1.164..3.313 rows=1,110 loops=1)

  • Buffers: shared hit=2,469
8. 0.140 1.210 ↑ 1.1 187 1

HashAggregate (cost=317.75..319.75 rows=200 width=4) (actual time=1.150..1.210 rows=187 loops=1)

  • Group Key: namespaces.id
  • Buffers: shared hit=888
9. 1.070 1.070 ↑ 4.4 187 1

CTE Scan on base_and_descendants namespaces (cost=291.07..307.49 rows=821 width=4) (actual time=0.010..1.070 rows=187 loops=1)

  • Buffers: shared hit=888
10.          

CTE base_and_descendants

11. 0.108 1.000 ↑ 4.4 187 1

Recursive Union (cost=0.00..291.07 rows=821 width=4) (actual time=0.007..1.000 rows=187 loops=1)

  • Buffers: shared hit=888
12. 0.002 0.002 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1)

13. 0.117 0.890 ↑ 2.2 37 5

Nested Loop (cost=0.56..27.46 rows=82 width=4) (actual time=0.026..0.178 rows=37 loops=5)

  • Buffers: shared hit=888
14. 0.025 0.025 ↓ 3.7 37 5

WorkTable Scan on base_and_descendants (cost=0.00..0.20 rows=10 width=4) (actual time=0.000..0.005 rows=37 loops=5)

15. 0.748 0.748 ↑ 8.0 1 187

Index Only Scan using index_namespaces_on_parent_id_and_id on public.namespaces namespaces_1 (cost=0.56..2.65 rows=8 width=8) (actual time=0.004..0.004 rows=1 loops=187)

  • Index Cond: (namespaces_1.parent_id = base_and_descendants.id)
  • Heap Fetches: 8
  • Buffers: shared hit=888
16. 1.683 1.683 ↑ 3.0 6 187

Index Only Scan using index_projects_on_namespace_id_and_id on public.projects (cost=0.43..2.48 rows=18 width=8) (actual time=0.005..0.009 rows=6 loops=187)

  • Index Cond: (projects.namespace_id = namespaces.id)
  • Heap Fetches: 41
  • Buffers: shared hit=1,581
17. 0.018 0.646 ↑ 3.2 34 1

Hash (cost=13.49..13.49 rows=110 width=4) (actual time=0.646..0.646 rows=34 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=210
18. 0.628 0.628 ↑ 3.2 34 1

Index Scan using index_lfs_objects_on_file_store on public.lfs_objects (cost=0.56..13.49 rows=110 width=4) (actual time=0.579..0.628 rows=34 loops=1)

  • Index Cond: (lfs_objects.file_store = 1)
  • Buffers: shared hit=210