explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BVKH

Settings
# exclusive inclusive rows x rows loops node
1. 0.025 6,864.321 ↑ 1.0 50 1

Limit (cost=3.55..1,766.77 rows=50 width=4,557) (actual time=6,453.380..6,864.321 rows=50 loops=1)

2. 0.166 6,864.296 ↑ 966.2 50 1

Nested Loop Left Join (cost=3.55..1,703,694.87 rows=48,312 width=4,557) (actual time=6,453.379..6,864.296 rows=50 loops=1)

3. 0.138 6,863.980 ↑ 966.2 50 1

Nested Loop Left Join (cost=3.26..1,688,053.12 rows=48,312 width=3,834) (actual time=6,453.351..6,863.980 rows=50 loops=1)

4. 0.108 6,863.192 ↑ 966.2 50 1

Nested Loop Left Join (cost=2.84..1,605,979.25 rows=48,312 width=2,914) (actual time=6,453.327..6,863.192 rows=50 loops=1)

5. 0.153 6,862.834 ↑ 966.2 50 1

Nested Loop Left Join (cost=2.41..1,529,141.08 rows=48,312 width=1,994) (actual time=6,453.303..6,862.834 rows=50 loops=1)

6. 0.123 6,862.531 ↑ 966.2 50 1

Nested Loop Left Join (cost=1.99..1,506,956.13 rows=48,312 width=1,919) (actual time=6,453.285..6,862.531 rows=50 loops=1)

7. 0.155 6,862.058 ↑ 966.2 50 1

Nested Loop Left Join (cost=1.56..1,477,968.52 rows=48,312 width=999) (actual time=6,453.261..6,862.058 rows=50 loops=1)

8. 0.119 6,861.703 ↑ 966.2 50 1

Nested Loop Left Join (cost=1.28..1,462,935.17 rows=48,312 width=884) (actual time=6,453.234..6,861.703 rows=50 loops=1)

9. 559.812 6,861.284 ↑ 966.2 50 1

Nested Loop (cost=0.85..1,440,750.22 rows=48,312 width=876) (actual time=6,453.215..6,861.284 rows=50 loops=1)

10. 3,295.256 3,295.256 ↑ 2.1 1,002,072 1

Index Scan using idx_741762_primary on user_topics (cost=0.43..391,357.74 rows=2,134,592 width=261) (actual time=0.028..3,295.256 rows=1,002,072 loops=1)

  • Filter: (NOT is_archived)
  • Rows Removed by Filter: 1,919,909
11. 3,006.216 3,006.216 ↓ 0.0 0 1,002,072

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

  • 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 : 40.255 ms
Execution time : 6,864.877 ms