explain.depesz.com

PostgreSQL's explain analyze made readable

Result: X9wS

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 7,247.439 ↑ 1.0 50 1

Limit (cost=3.55..1,697.06 rows=50 width=4,553) (actual time=6,757.119..7,247.439 rows=50 loops=1)

2. 0.176 7,247.412 ↑ 1,016.3 50 1

Nested Loop Left Join (cost=3.55..1,721,178.68 rows=50,817 width=4,553) (actual time=6,757.117..7,247.412 rows=50 loops=1)

3. 0.157 7,247.086 ↑ 1,016.3 50 1

Nested Loop Left Join (cost=3.26..1,704,725.90 rows=50,817 width=3,832) (actual time=6,757.092..7,247.086 rows=50 loops=1)

4. 0.131 7,246.279 ↑ 1,016.3 50 1

Nested Loop Left Join (cost=2.84..1,618,398.54 rows=50,817 width=2,912) (actual time=6,757.068..7,246.279 rows=50 loops=1)

5. 0.159 7,245.898 ↑ 1,016.3 50 1

Nested Loop Left Join (cost=2.41..1,537,577.67 rows=50,817 width=1,992) (actual time=6,757.049..7,245.898 rows=50 loops=1)

6. 0.134 7,245.589 ↑ 1,016.3 50 1

Nested Loop Left Join (cost=1.99..1,514,246.75 rows=50,817 width=1,917) (actual time=6,757.036..7,245.589 rows=50 loops=1)

7. 0.149 7,245.105 ↑ 1,016.3 50 1

Nested Loop Left Join (cost=1.56..1,483,791.87 rows=50,817 width=997) (actual time=6,757.015..7,245.105 rows=50 loops=1)

8. 0.125 7,244.756 ↑ 1,016.3 50 1

Nested Loop Left Join (cost=1.28..1,467,979.03 rows=50,817 width=882) (actual time=6,756.999..7,244.756 rows=50 loops=1)

9. 0.000 7,244.331 ↑ 1,016.3 50 1

Nested Loop (cost=0.85..1,444,648.11 rows=50,817 width=874) (actual time=6,756.979..7,244.331 rows=50 loops=1)

10. 3,388.003 3,388.003 ↑ 2.1 1,002,073 1

Index Scan using idx_741762_primary on user_topics (cost=0.43..391,040.89 rows=2,144,117 width=261) (actual time=0.017..3,388.003 rows=1,002,073 loops=1)

  • Filter: (NOT is_archived)
  • Rows Removed by Filter: 1,919,908
11. 4,008.292 4,008.292 ↓ 0.0 0 1,002,073

Index Scan using idx_741710_primary on users "user" (cost=0.42..0.49 rows=1 width=613) (actual time=0.004..0.004 rows=0 loops=1,002,073)

  • Index Cond: (id = user_topics.user_id)
  • Filter: (organisation_id = 2,697)
  • Rows Removed by Filter: 1
12. 0.300 0.300 ↑ 1.0 1 50

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

  • Index Cond: (id = user_topics.topic_id)
13. 0.200 0.200 ↑ 1.0 1 50

Index Scan using idx_741780_primary on workspaces workspace (cost=0.29..0.31 rows=1 width=123) (actual time=0.004..0.004 rows=1 loops=50)

  • Index Cond: (id = workspace_join.workspace_id)
14. 0.350 0.350 ↑ 1.0 1 50

Index Scan using idx_741672_primary on topic_versions "topicVersion" (cost=0.42..0.60 rows=1 width=920) (actual time=0.007..0.007 rows=1 loops=50)

  • Index Cond: (id = user_topics.topic_version_id)
15. 0.150 0.150 ↑ 1.0 1 50

Index Scan using idx_741655_primary on topics topic (cost=0.42..0.46 rows=1 width=75) (actual time=0.003..0.003 rows=1 loops=50)

  • Index Cond: (id = user_topics.topic_id)
16. 0.250 0.250 ↑ 1.0 1 50

Index Scan using idx_741672_primary on topic_versions "topic:currentTopicVersion" (cost=0.42..1.59 rows=1 width=920) (actual time=0.005..0.005 rows=1 loops=50)

  • Index Cond: (id = topic.production_topic_version_id)
17. 0.650 0.650 ↑ 2.0 1 50

Index Scan using idx_741672_topic_id on topic_versions (cost=0.42..1.68 rows=2 width=920) (actual time=0.008..0.013 rows=1 loops=50)

  • Index Cond: (topic_id = topic.id)
  • Filter: ((status)::text = 'DRAFT'::text)
  • Rows Removed by Filter: 6
18. 0.150 0.150 ↓ 0.0 0 50

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

  • Index Cond: (id = topic.theme_id)
Planning time : 18.331 ms
Execution time : 7,247.767 ms