explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nT6q

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 27,141.871 ↑ 1.0 10 1

Limit (cost=85,492.92..85,493.02 rows=10 width=16) (actual time=27,141.821..27,141.871 rows=10 loops=1)

2. 0.021 27,141.855 ↑ 6.9 10 1

Unique (cost=85,492.92..85,493.61 rows=69 width=16) (actual time=27,141.818..27,141.855 rows=10 loops=1)

3. 168.738 27,141.834 ↑ 6.9 10 1

Sort (cost=85,492.92..85,493.10 rows=69 width=16) (actual time=27,141.815..27,141.834 rows=10 loops=1)

  • Sort Key: latest.xlinkid DESC, root.xlinkid, latest.creationdate
  • Sort Method: quicksort Memory: 14,482kB
4. 431.179 26,973.096 ↓ 2,577.7 177,860 1

Nested Loop (cost=361.32..85,490.82 rows=69 width=16) (actual time=22,584.848..26,973.096 rows=177,860 loops=1)

  • Join Filter: (root.threadendxlinkid = latest.xlinkid)
5. 5,938.446 26,186.197 ↓ 88,930.0 177,860 1

Nested Loop (cost=360.88..85,487.03 rows=2 width=12) (actual time=22,584.830..26,186.197 rows=177,860 loops=1)

6. 6,378.437 10,176.325 ↓ 266.7 5,035,713 1

Nested Loop (cost=360.45..49,606.80 rows=18,880 width=4) (actual time=200.885..10,176.325 rows=5,035,713 loops=1)

7. 0.017 0.017 ↑ 1.0 1 1

Index Scan using dgroup_groupname_key on dgroup g (cost=0.28..8.29 rows=1 width=4) (actual time=0.014..0.017 rows=1 loops=1)

  • Index Cond: ((groupname)::text = 'benchmark-xlarge-000'::text)
8. 3,606.267 3,797.871 ↓ 264.2 5,035,713 1

Bitmap Heap Scan on dgroup_for_xlink gf (cost=360.17..49,407.88 rows=19,062 width=8) (actual time=200.863..3,797.871 rows=5,035,713 loops=1)

  • Recheck Cond: (groupid = g.groupid)
  • Heap Blocks: exact=54,451
9. 191.604 191.604 ↓ 264.2 5,035,713 1

Bitmap Index Scan on dgroup_for_xlink_groupid_xlinkid_key (cost=0.00..355.40 rows=19,062 width=0) (actual time=191.603..191.604 rows=5,035,713 loops=1)

  • Index Cond: (groupid = g.groupid)
10. 10,071.426 10,071.426 ↓ 0.0 0 5,035,713

Index Scan using threadendxlinkid_idx on xlink root (cost=0.43..1.89 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=5,035,713)

  • Index Cond: ((threadendxlinkid = gf.xlinkid) AND (threadendxlinkid IS NOT NULL))
  • Filter: (accepted AND (((contentrole)::text = 'Comment'::text) OR ((contentrole)::text = 'File Attachment'::text)))
11. 355.720 355.720 ↑ 1.0 1 177,860

Index Scan using xlink_pkey on xlink latest (cost=0.43..1.88 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=177,860)

  • Index Cond: (xlinkid = gf.xlinkid)
Planning time : 1.528 ms
Execution time : 27,142.363 ms