explain.depesz.com

PostgreSQL's explain analyze made readable

Result: g8Jz

Settings
# exclusive inclusive rows x rows loops node
1. 0.032 7,389.082 ↑ 1.0 50 1

Limit (cost=2.84..2,033.93 rows=50 width=437) (actual time=6,496.502..7,389.082 rows=50 loops=1)

2. 0.234 7,389.050 ↑ 783.9 50 1

Nested Loop (cost=2.84..1,592,249.98 rows=39,197 width=437) (actual time=6,496.500..7,389.050 rows=50 loops=1)

3. 0.189 7,388.544 ↑ 288.2 136 1

Nested Loop (cost=2.55..1,579,559.36 rows=39,197 width=415) (actual time=6,496.484..7,388.544 rows=136 loops=1)

4. 0.262 7,387.807 ↑ 286.1 137 1

Nested Loop (cost=2.13..1,517,218.21 rows=39,197 width=382) (actual time=6,496.472..7,387.807 rows=137 loops=1)

  • Join Filter: (topic.id = topic_versions.topic_id)
5. 0.305 7,386.038 ↑ 290.5 137 1

Nested Loop (cost=1.70..1,489,029.30 rows=39,804 width=353) (actual time=6,496.454..7,386.038 rows=137 loops=1)

6. 0.217 7,385.048 ↑ 290.5 137 1

Nested Loop (cost=1.28..1,470,751.83 rows=39,804 width=337) (actual time=6,496.438..7,385.048 rows=137 loops=1)

7. 710.541 7,384.009 ↑ 352.9 137 1

Nested Loop (cost=0.85..1,441,747.96 rows=48,349 width=300) (actual time=6,496.418..7,384.009 rows=137 loops=1)

8. 3,507.511 3,507.511 ↑ 2.0 1,055,319 1

Index Scan using idx_741762_primary on user_topics (cost=0.43..391,619.60 rows=2,136,255 width=261) (actual time=0.020..3,507.511 rows=1,055,319 loops=1)

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

Index Scan using idx_741710_primary on users "user" (cost=0.42..0.49 rows=1 width=47) (actual time=0.003..0.003 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.685 0.685 ↑ 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.005..0.005 rows=1 loops=137)

  • Index Cond: (id = user_topics.topic_id)
12. 1.507 1.507 ↑ 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.008..0.011 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 : 9.211 ms
Execution time : 7,389.260 ms