explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Hktf

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 7,246.728 ↑ 1.0 50 1

Limit (cost=2.84..1,569.93 rows=50 width=437) (actual time=6,829.427..7,246.728 rows=50 loops=1)

2. 0.104 7,246.704 ↑ 1,083.0 50 1

Nested Loop Left Join (cost=2.84..1,697,220.52 rows=54,152 width=437) (actual time=6,829.426..7,246.704 rows=50 loops=1)

3. 0.116 7,246.450 ↑ 1,083.0 50 1

Nested Loop Left Join (cost=2.55..1,679,687.98 rows=54,152 width=415) (actual time=6,829.411..7,246.450 rows=50 loops=1)

4. 0.119 7,245.734 ↑ 1,083.0 50 1

Nested Loop Left Join (cost=2.13..1,587,690.72 rows=54,152 width=386) (actual time=6,829.394..7,245.734 rows=50 loops=1)

5. 0.120 7,245.415 ↑ 1,083.0 50 1

Nested Loop Left Join (cost=1.70..1,501,564.29 rows=54,152 width=353) (actual time=6,829.382..7,245.415 rows=50 loops=1)

6. 0.100 7,244.995 ↑ 1,083.0 50 1

Nested Loop Left Join (cost=1.28..1,476,700.42 rows=54,152 width=337) (actual time=6,829.365..7,244.995 rows=50 loops=1)

7. 0.000 7,244.545 ↑ 1,083.0 50 1

Nested Loop (cost=0.85..1,444,232.00 rows=54,152 width=300) (actual time=6,829.346..7,244.545 rows=50 loops=1)

8. 3,378.189 3,378.189 ↑ 2.1 1,002,038 1

Index Scan using idx_741762_primary on user_topics (cost=0.43..392,259.82 rows=2,140,422 width=261) (actual time=0.018..3,378.189 rows=1,002,038 loops=1)

  • Filter: (NOT is_archived)
  • Rows Removed by Filter: 1,919,943
9. 4,008.152 4,008.152 ↓ 0.0 0 1,002,038

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

  • Index Cond: (id = user_topics.user_id)
  • Filter: (organisation_id = 2,697)
  • Rows Removed by Filter: 1
10. 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=45) (actual time=0.007..0.007 rows=1 loops=50)

  • Index Cond: (id = user_topics.topic_version_id)
11. 0.300 0.300 ↑ 1.0 1 50

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=50)

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

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=50)

  • Index Cond: (id = topic.production_topic_version_id)
13. 0.600 0.600 ↑ 2.0 1 50

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

  • Index Cond: (topic_id = topic.id)
  • Filter: ((status)::text = 'DRAFT'::text)
  • Rows Removed by Filter: 6
14. 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=34) (actual time=0.003..0.003 rows=0 loops=50)

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