explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mbgW

Settings
# exclusive inclusive rows x rows loops node
1. 0.029 10,423.730 ↑ 1.0 50 1

Limit (cost=2.84..1,818.43 rows=50 width=436) (actual time=9,566.682..10,423.730 rows=50 loops=1)

2. 0.249 10,423.701 ↑ 888.4 50 1

Nested Loop (cost=2.84..1,613,011.22 rows=44,421 width=436) (actual time=9,566.681..10,423.701 rows=50 loops=1)

3. 0.218 10,423.180 ↑ 326.6 136 1

Nested Loop (cost=2.55..1,598,629.25 rows=44,421 width=414) (actual time=9,566.667..10,423.180 rows=136 loops=1)

4. 0.291 10,422.414 ↑ 324.2 137 1

Nested Loop (cost=2.13..1,527,979.55 rows=44,421 width=381) (actual time=9,566.656..10,422.414 rows=137 loops=1)

  • Join Filter: (topic.id = topic_versions.topic_id)
5. 0.270 10,420.479 ↑ 329.3 137 1

Nested Loop (cost=1.70..1,496,037.52 rows=45,109 width=352) (actual time=9,566.638..10,420.479 rows=137 loops=1)

6. 0.296 10,419.387 ↑ 329.3 137 1

Nested Loop (cost=1.28..1,475,324.54 rows=45,109 width=336) (actual time=9,566.621..10,419.387 rows=137 loops=1)

7. 386.242 10,418.269 ↑ 399.9 137 1

Nested Loop (cost=0.85..1,442,459.84 rows=54,793 width=299) (actual time=9,566.602..10,418.269 rows=137 loops=1)

8. 4,755.432 4,755.432 ↑ 2.0 1,055,319 1

Index Scan using idx_741762_primary on user_topics (cost=0.43..391,801.00 rows=2,137,454 width=261) (actual time=0.020..4,755.432 rows=1,055,319 loops=1)

  • Filter: (NOT is_archived)
  • Rows Removed by Filter: 1,991,181
9. 5,276.595 5,276.595 ↓ 0.0 0 1,055,319

Index Scan using idx_741710_primary on users "user" (cost=0.42..0.49 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1,055,319)

  • Index Cond: (id = user_topics.user_id)
  • Filter: (organisation_id = 2,697)
  • Rows Removed by Filter: 1
10. 0.822 0.822 ↑ 1.0 1 137

Index Scan using idx_741672_primary on topic_versions "topicVersion" (cost=0.42..0.60 rows=1 width=45) (actual time=0.006..0.006 rows=1 loops=137)

  • Index Cond: (id = user_topics.topic_version_id)
11. 0.822 0.822 ↑ 1.0 1 137

Index Scan using idx_741655_primary on topics topic (cost=0.42..0.46 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=137)

  • Index Cond: (id = user_topics.topic_id)
12. 1.644 1.644 ↑ 2.0 1 137

Index Scan using idx_741672_topic_id on topic_versions (cost=0.42..0.68 rows=2 width=45) (actual time=0.009..0.012 rows=1 loops=137)

  • Index Cond: (topic_id = user_topics.topic_id)
  • Filter: ((status)::text = 'DRAFT'::text)
  • Rows Removed by Filter: 5
13. 0.548 0.548 ↑ 1.0 1 137

Index Scan using idx_741672_primary on topic_versions "topic:currentTopicVersion" (cost=0.42..1.59 rows=1 width=45) (actual time=0.004..0.004 rows=1 loops=137)

  • Index Cond: (id = topic.production_topic_version_id)
14. 0.272 0.272 ↓ 0.0 0 136

Index Scan using idx_741371_primary on courses "topic:theme" (cost=0.29..0.32 rows=1 width=34) (actual time=0.002..0.002 rows=0 loops=136)

  • Index Cond: (id = topic.theme_id)
Planning time : 17.437 ms
Execution time : 10,423.899 ms