explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nEzq

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 615.261 ↑ 1.0 2 1

Limit (cost=70,717.71..70,717.71 rows=2 width=319) (actual time=615.260..615.261 rows=2 loops=1)

2. 2.797 615.259 ↑ 1,074.0 2 1

Sort (cost=70,717.71..70,723.08 rows=2,148 width=319) (actual time=615.259..615.259 rows=2 loops=1)

  • Sort Key: bp1.date_last_comment DESC
  • Sort Method: top-N heapsort Memory: 26kB
3. 40.234 612.462 ↓ 2.2 4,748 1

GroupAggregate (cost=70,631.79..70,696.23 rows=2,148 width=319) (actual time=568.772..612.462 rows=4,748 loops=1)

  • Group Key: bp1.id_post
4. 10.110 572.228 ↓ 2.1 8,835 1

Sort (cost=70,631.79..70,642.53 rows=4,296 width=319) (actual time=568.735..572.228 rows=8,835 loops=1)

  • Sort Key: bp1.id_post
  • Sort Method: quicksort Memory: 6918kB
5. 7.945 562.118 ↓ 2.1 8,835 1

Nested Loop Left Join (cost=32.61..70,372.55 rows=4,296 width=319) (actual time=0.126..562.118 rows=8,835 loops=1)

6. 17.649 17.649 ↓ 2.2 4,748 1

Index Scan using fki_blog_posts_blogs on posts bp1 (cost=0.43..1,155.97 rows=2,148 width=69) (actual time=0.016..17.649 rows=4,748 loops=1)

  • Index Cond: (id_blog = ANY ('{1,22,16}'::integer[]))
  • Filter: (NOT is_deleted)
  • Rows Removed by Filter: 1914
7. 9.496 536.524 ↑ 1.0 2 4,748

Subquery Scan on c1 (cost=32.18..32.20 rows=2 width=250) (actual time=0.112..0.113 rows=2 loops=4,748)

8. 9.496 527.028 ↑ 1.0 2 4,748

Limit (cost=32.18..32.18 rows=2 width=226) (actual time=0.110..0.111 rows=2 loops=4,748)

9. 75.968 517.532 ↑ 19.0 2 4,748

Sort (cost=32.18..32.27 rows=38 width=226) (actual time=0.109..0.109 rows=2 loops=4,748)

  • Sort Key: bc1.thread_date DESC
  • Sort Method: top-N heapsort Memory: 25kB
10. 213.660 441.564 ↑ 1.1 35 4,748

HashAggregate (cost=31.42..31.80 rows=38 width=226) (actual time=0.084..0.093 rows=35 loops=4,748)

  • Group Key: bc1.id_comment
11. 227.904 227.904 ↑ 1.1 35 4,748

Index Scan using idx_comments_posts_parents on comments bc1 (cost=0.56..31.32 rows=38 width=226) (actual time=0.010..0.048 rows=35 loops=4,748)

  • Index Cond: ((id_post = bp1.id_post) AND (id_parent = 0))
Planning time : 0.358 ms
Execution time : 615.362 ms