explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aLeJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 4,784.381 ↑ 1.0 50 1

Limit (cost=1,002.73..11,829.70 rows=50 width=914) (actual time=4,447.243..4,784.381 rows=50 loops=1)

2. 66.629 4,787.130 ↑ 102.4 50 1

Gather Merge (cost=1,002.73..1,109,900.93 rows=5,121 width=914) (actual time=4,447.242..4,787.130 rows=50 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.061 4,720.051 ↑ 101.6 21 3 / 3

Nested Loop Left Join (cost=2.71..1,065,088.58 rows=2,134 width=398) (actual time=4,423.480..4,720.051 rows=21 loops=3)

4. 0.056 4,719.926 ↑ 101.6 21 3 / 3

Nested Loop Left Join (cost=2.42..1,064,397.66 rows=2,134 width=376) (actual time=4,423.461..4,719.926 rows=21 loops=3)

5. 0.050 4,719.614 ↑ 101.6 21 3 / 3

Nested Loop Left Join (cost=1.99..1,060,772.27 rows=2,134 width=347) (actual time=4,423.441..4,719.614 rows=21 loops=3)

6. 0.043 4,719.436 ↑ 101.6 21 3 / 3

Nested Loop Left Join (cost=1.57..1,057,378.23 rows=2,134 width=314) (actual time=4,423.404..4,719.436 rows=21 loops=3)

7. 287.609 4,719.244 ↑ 101.6 21 3 / 3

Nested Loop (cost=1.14..1,056,098.69 rows=2,134 width=277) (actual time=4,423.377..4,719.244 rows=21 loops=3)

8. 173.348 3,425.579 ↑ 2.7 335,352 3 / 3

Nested Loop (cost=0.85..776,385.65 rows=891,737 width=285) (actual time=0.038..3,425.579 rows=335,352 loops=3)

9. 1,574.728 1,574.728 ↑ 2.7 335,501 3 / 3

Parallel Index Scan using idx_741762_primary on user_topics (cost=0.43..366,943.15 rows=891,737 width=261) (actual time=0.018..1,574.728 rows=335,501 loops=3)

  • Filter: (NOT is_archived)
  • Rows Removed by Filter: 643,963
10. 1,677.503 1,677.503 ↑ 1.0 1 1,006,502 / 3

Index Scan using idx_741655_primary on topics topic (cost=0.42..0.46 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=1,006,502)

  • Index Cond: (id = user_topics.topic_id)
11. 1,006.056 1,006.056 ↓ 0.0 0 1,006,056 / 3

Index Scan using idx_741780_primary on workspaces (cost=0.29..0.31 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1,006,056)

  • Index Cond: (id = topic.workspace_id)
  • Filter: (organisation_id = 2,697)
  • Rows Removed by Filter: 1
12. 0.149 0.149 ↑ 1.0 1 64 / 3

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

  • Index Cond: (id = user_topics.topic_version_id)
13. 0.128 0.128 ↑ 1.0 1 64 / 3

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

  • Index Cond: (id = topic.production_topic_version_id)
14. 0.256 0.256 ↑ 2.0 1 64 / 3

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

  • Index Cond: (topic_id = topic.id)
  • Filter: ((status)::text = 'DRAFT'::text)
  • Rows Removed by Filter: 5
15. 0.064 0.064 ↓ 0.0 0 64 / 3

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

  • Index Cond: (id = topic.theme_id)
16.          

SubPlan (for Gather Merge)

17. 0.450 0.450 ↑ 1.0 1 50

Index Scan using idx_741710_primary on users (cost=0.42..8.44 rows=1 width=30) (actual time=0.005..0.009 rows=1 loops=50)

  • Index Cond: (id = user_topics.user_id)
Planning time : 9.199 ms
Execution time : 4,787.316 ms