explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MFtO

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

Sort (cost=1,951,747.14..1,959,001.25 rows=2,901,645 width=232) (actual time=0.663..0.663 rows=0 loops=1)

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

Unique (cost=1,367,340.98..1,454,390.33 rows=2,901,645 width=232) (actual time=0.659..0.659 rows=0 loops=1)

3. 0.026 0.659 ↓ 0.0 0 1

Sort (cost=1,367,340.98..1,374,595.10 rows=2,901,645 width=232) (actual time=0.659..0.659 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.633 ↓ 0.0 0 1

Append (cost=1.14..869,984.18 rows=2,901,645 width=232) (actual time=0.633..0.633 rows=0 loops=1)

5. 0.001 0.616 ↓ 0.0 0 1

Nested Loop (cost=1.14..437,866.72 rows=476,395 width=185) (actual time=0.615..0.616 rows=0 loops=1)

6. 0.615 0.615 ↓ 0.0 0 1

Index Scan using comment_parent_idx on comments (cost=0.56..157.73 rows=133 width=8) (actual time=0.615..0.615 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.23 rows=3,582 width=177) (never executed)

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

Nested Loop (cost=1.71..388,592.78 rows=2,425,250 width=185) (actual time=0.016..0.016 rows=0 loops=1)

9. 0.001 0.016 ↓ 0.0 0 1

Nested Loop (cost=1.14..22,511.52 rows=677 width=8) (actual time=0.016..0.016 rows=0 loops=1)

10. 0.015 0.015 ↓ 0.0 0 1

Index Scan using comment_parent_idx on comments parents (cost=0.56..157.38 rows=142 width=8) (actual time=0.015..0.015 rows=0 loops=1)

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

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

  • Index Cond: (parent = (parents.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..504.92 rows=3,582 width=177) (never executed)

  • Index Cond: ((parent = (comments_1.id)::text) AND (type = 0))
Planning time : 2.833 ms
Execution time : 0.795 ms