explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8jaI

Settings
# exclusive inclusive rows x rows loops node
1. 4.800 1,092.221 ↑ 1.0 1 1

Nested Loop (cost=939.58..11,658.24 rows=1 width=4) (actual time=446.258..1,092.221 rows=1 loops=1)

  • Join Filter: (o_1.object_id = o_2.object_id)
  • Rows Removed by Join Filter: 13429
2. 0.002 82.107 ↑ 1.0 1 1

Nested Loop (cost=52.78..1,546.14 rows=1 width=8) (actual time=78.960..82.107 rows=1 loops=1)

  • Join Filter: (o.object_id = o2.object_id)
3. 0.003 82.097 ↑ 1.0 1 1

Nested Loop (cost=52.35..1,545.46 rows=1 width=20) (actual time=78.952..82.097 rows=1 loops=1)

4. 0.005 82.081 ↑ 1.0 1 1

Nested Loop (cost=51.93..1,544.60 rows=1 width=16) (actual time=78.937..82.081 rows=1 loops=1)

5. 5.571 82.063 ↑ 1.0 1 1

Nested Loop (cost=51.50..1,544.00 rows=1 width=20) (actual time=78.922..82.063 rows=1 loops=1)

6. 6.474 62.344 ↓ 116.0 7,074 1

Nested Loop (cost=51.21..1,522.00 rows=61 width=16) (actual time=2.277..62.344 rows=7,074 loops=1)

7. 3.248 9.286 ↓ 16.1 15,528 1

Nested Loop (cost=50.79..312.19 rows=963 width=8) (actual time=2.244..9.286 rows=15,528 loops=1)

8. 0.020 0.020 ↓ 6.0 6 1

Seq Scan on object_assignment_types oat (cost=0.00..1.41 rows=1 width=32) (actual time=0.009..0.020 rows=6 loops=1)

  • Filter: (((object_type_handle)::text = 'article'::text) AND ((base_object_type_handle)::text = 'file'::text))
  • Rows Removed by Filter: 22
9. 3.798 6.018 ↓ 1.3 2,588 6

Bitmap Heap Scan on objects_to_objects oto (cost=50.79..290.79 rows=2,000 width=29) (actual time=0.379..1.003 rows=2,588 loops=6)

  • Recheck Cond: ((object_assignment_type_handle)::text = (oat.object_assignment_type_handle)::text)
10. 2.220 2.220 ↓ 1.3 2,639 6

Bitmap Index Scan on fk_objects_to_objects_object_assignment_type_handle (cost=0.00..50.29 rows=2,000 width=0) (actual time=0.370..0.370 rows=2,639 loops=6)

  • Index Cond: ((object_assignment_type_handle)::text = (oat.object_assignment_type_handle)::text)
11. 46.584 46.584 ↓ 0.0 0 15,528

Index Scan using pk_objects on objects o (cost=0.42..1.25 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=15,528)

  • Index Cond: (object_id = oto.object_id)
  • Filter: (((object_state_handle)::text <> 'deleted'::text) AND ((object_type_handle)::text = 'article'::text))
  • Rows Removed by Filter: 1
12. 14.148 14.148 ↓ 0.0 0 7,074

Index Scan using pk_articles on articles a (cost=0.29..0.35 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=7,074)

  • Index Cond: (article_id = o.object_id)
  • Filter: ((956174 = o.object_id) OR (956174 = base_article_id))
  • Rows Removed by Filter: 1
13. 0.013 0.013 ↑ 1.0 1 1

Index Only Scan using fk_article_data_object_revision_id on article_data ad (cost=0.42..0.59 rows=1 width=4) (actual time=0.011..0.013 rows=1 loops=1)

  • Index Cond: (object_revision_id = o.object_revision_id)
  • Heap Fetches: 1
14. 0.013 0.013 ↑ 1.0 1 1

Index Only Scan using alt_objects on objects o_1 (cost=0.42..0.85 rows=1 width=4) (actual time=0.012..0.013 rows=1 loops=1)

  • Index Cond: (object_id = oto.base_object_id)
  • Filter: ((object_state_handle)::text <> 'deleted'::text)
  • Heap Fetches: 0
15. 0.008 0.008 ↑ 1.0 1 1

Index Only Scan using alt_objects on objects o2 (cost=0.42..0.67 rows=1 width=4) (actual time=0.006..0.008 rows=1 loops=1)

  • Index Cond: (object_id = a.article_id)
  • Filter: ((object_state_handle)::text <> 'deleted'::text)
  • Heap Fetches: 1
16. 29.461 1,005.314 ↓ 159.9 13,430 1

Hash Join (cost=886.80..10,111.05 rows=84 width=8) (actual time=10.058..1,005.314 rows=13,430 loops=1)

  • Hash Cond: (o_2.object_id = f.file_id)
17. 966.823 970.153 ↓ 3.4 13,430 1

Bitmap Heap Scan on objects o_2 (cost=388.51..9,567.68 rows=3,932 width=4) (actual time=4.341..970.153 rows=13,430 loops=1)

  • Recheck Cond: (((object_state_handle)::text = 'active'::text) AND ((object_type_handle)::text = 'file'::text))
  • Filter: sp_object_is_active(object_id, 'default'::text, NULL::integer)
18. 3.330 3.330 ↓ 1.1 13,512 1

Bitmap Index Scan on fk_objects_object_state_handle_object_type_handle (cost=0.00..387.53 rows=12,210 width=0) (actual time=3.330..3.330 rows=13,512 loops=1)

  • Index Cond: (((object_state_handle)::text = 'active'::text) AND ((object_type_handle)::text = 'file'::text))
19. 2.763 5.700 ↑ 1.0 15,147 1

Hash (cost=308.13..308.13 rows=15,213 width=4) (actual time=5.700..5.700 rows=15,147 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 533kB
20. 2.937 2.937 ↑ 1.0 15,147 1

Seq Scan on files f (cost=0.00..308.13 rows=15,213 width=4) (actual time=0.003..2.937 rows=15,147 loops=1)