explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fBVI

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 0.863 ↓ 0.0 0 1

Sort (cost=1,980,054.21..1,987,433.12 rows=2,951,563 width=232) (actual time=0.863..0.863 rows=0 loops=1)

  • Sort Key: links.date_added DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.000 0.859 ↓ 0.0 0 1

Unique (cost=1,385,231.05..1,473,777.94 rows=2,951,563 width=232) (actual time=0.859..0.859 rows=0 loops=1)

3. 0.008 0.859 ↓ 0.0 0 1

Sort (cost=1,385,231.05..1,392,609.95 rows=2,951,563 width=232) (actual time=0.859..0.859 rows=0 loops=1)

  • Sort Key: links.id, links.userid, links.parent, links.type, links.host, links.url, links.date_added, links.label, links.doc_linked, links.task_linked, links.date_added
  • Sort Method: quicksort Memory: 25kB
4. 0.001 0.851 ↓ 0.0 0 1

Append (cost=1.14..878,954.77 rows=2,951,563 width=232) (actual time=0.851..0.851 rows=0 loops=1)

5. 0.001 0.419 ↓ 0.0 0 1

Nested Loop (cost=1.14..437,868.85 rows=476,405 width=185) (actual time=0.419..0.419 rows=0 loops=1)

6. 0.418 0.418 ↓ 0.0 0 1

Index Scan using comment_parent_idx on comments (cost=0.56..157.73 rows=133 width=8) (actual time=0.418..0.418 rows=0 loops=1)

  • Index Cond: (parent = '98pk'::text)
  • Filter: (type = 1)
7. 0.000 0.000 ↓ 0.0 0

Index Scan using links_parent_type_idx on links (cost=0.57..3,255.24 rows=3,582 width=177) (never executed)

  • Index Cond: ((parent = (comments.id)::text) AND (type = 0))
8. 0.000 0.431 ↓ 0.0 0 1

Nested Loop (cost=1.71..396,812.48 rows=2,475,158 width=185) (actual time=0.431..0.431 rows=0 loops=1)

9. 0.000 0.431 ↓ 0.0 0 1

Nested Loop (cost=1.14..22,986.46 rows=691 width=8) (actual time=0.431..0.431 rows=0 loops=1)

10. 0.431 0.431 ↓ 0.0 0 1

Index Scan using task_id_idx2 on comments comments_1 (cost=0.56..161.04 rows=145 width=8) (actual time=0.431..0.431 rows=0 loops=1)

  • Index Cond: (task_id = '98pk'::text)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using comment_parent_idx on comments threaded_comments (cost=0.57..157.37 rows=5 width=15) (never executed)

  • Index Cond: (parent = (comments_1.id)::text)
  • Filter: (type = 2)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using links_parent_type_idx on links links_1 (cost=0.57..505.17 rows=3,582 width=177) (never executed)

  • Index Cond: ((parent = (threaded_comments.id)::text) AND (type = 0))
Planning time : 1.001 ms
Execution time : 0.940 ms