explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2IYC

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2,234.142 ↑ 1.0 50 1

Limit (cost=1,003.15..11,442.17 rows=50 width=3,714) (actual time=2,086.746..2,234.142 rows=50 loops=1)

2. 30.104 2,252.120 ↑ 104.5 50 1

Gather Merge (cost=1,003.15..1,091,671.44 rows=5,224 width=3,714) (actual time=2,086.744..2,252.120 rows=50 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.036 2,222.016 ↑ 108.8 20 3 / 3

Nested Loop Left Join (cost=3.13..1,090,068.44 rows=2,177 width=3,714) (actual time=2,079.339..2,222.016 rows=20 loops=3)

4. 0.038 2,221.941 ↑ 108.8 20 3 / 3

Nested Loop Left Join (cost=2.84..1,089,363.57 rows=2,177 width=3,223) (actual time=2,079.327..2,221.941 rows=20 loops=3)

5. 0.020 2,221.746 ↑ 108.8 20 3 / 3

Nested Loop Left Join (cost=2.42..1,085,664.57 rows=2,177 width=2,309) (actual time=2,079.311..2,221.746 rows=20 loops=3)

6. 0.019 2,221.628 ↑ 108.8 20 3 / 3

Nested Loop Left Join (cost=1.99..1,082,201.61 rows=2,177 width=1,395) (actual time=2,079.294..2,221.628 rows=20 loops=3)

7. 0.027 2,221.550 ↑ 108.8 20 3 / 3

Nested Loop Left Join (cost=1.57..1,081,202.84 rows=2,177 width=1,320) (actual time=2,079.281..2,221.550 rows=20 loops=3)

8. 0.000 2,221.425 ↑ 108.8 20 3 / 3

Nested Loop (cost=1.14..1,079,904.20 rows=2,177 width=406) (actual time=2,079.261..2,221.425 rows=20 loops=3)

9. 211.999 1,574.212 ↑ 2.7 334,632 3 / 3

Nested Loop (cost=0.85..794,556.98 rows=909,699 width=291) (actual time=0.025..1,574.212 rows=334,632 loops=3)

10. 692.652 692.652 ↑ 2.7 334,780 3 / 3

Parallel Index Scan using idx_741762_primary on user_topics (cost=0.43..377,204.53 rows=909,699 width=283) (actual time=0.014..692.652 rows=334,780 loops=3)

  • Filter: (NOT is_archived)
  • Rows Removed by Filter: 643,873
11. 669.561 669.561 ↑ 1.0 1 1,004,341 / 3

Index Scan using idx_741655_primary on topics workspace_join (cost=0.42..0.46 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=1,004,341)

  • Index Cond: (id = user_topics.topic_id)
12. 669.263 669.263 ↓ 0.0 0 1,003,895 / 3

Index Scan using idx_741780_primary on workspaces workspace (cost=0.29..0.31 rows=1 width=123) (actual time=0.002..0.002 rows=0 loops=1,003,895)

  • Index Cond: (id = workspace_join.workspace_id)
  • Filter: (organisation_id = 2,697)
  • Rows Removed by Filter: 1
13. 0.098 0.098 ↑ 1.0 1 59 / 3

Index Scan using idx_741672_primary on topic_versions "topicVersion" (cost=0.42..0.60 rows=1 width=914) (actual time=0.005..0.005 rows=1 loops=59)

  • Index Cond: (id = user_topics.topic_version_id)
14. 0.059 0.059 ↑ 1.0 1 59 / 3

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

  • Index Cond: (id = user_topics.topic_id)
15. 0.098 0.098 ↑ 1.0 1 59 / 3

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

  • Index Cond: (id = topic.production_topic_version_id)
16. 0.157 0.157 ↑ 2.0 1 59 / 3

Index Scan using idx_741672_topic_id on topic_versions (cost=0.42..1.68 rows=2 width=914) (actual time=0.006..0.008 rows=1 loops=59)

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

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

  • Index Cond: (id = topic.theme_id)
Planning time : 6.104 ms
Execution time : 2,252.302 ms