explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hfKG

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 3,447.434 ↑ 1.0 101 1

Limit (cost=53,904.31..53,904.57 rows=101 width=24) (actual time=3,447.420..3,447.434 rows=101 loops=1)

2.          

CTE current_userroles

3. 0.002 0.002 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=1)

4. 80.894 3,447.427 ↑ 9.2 101 1

Sort (cost=53,904.30..53,906.62 rows=925 width=24) (actual time=3,447.418..3,447.427 rows=101 loops=1)

  • Sort Key: thread.date_updated DESC NULLS LAST, thread.id DESC NULLS LAST
  • Sort Method: top-N heapsort Memory: 32kB
5. 678.238 3,366.533 ↓ 1,000.2 925,169 1

HashAggregate (cost=53,859.64..53,868.89 rows=925 width=24) (actual time=3,131.234..3,366.533 rows=925,169 loops=1)

  • Group Key: thread.id
6. 2,507.285 2,688.295 ↓ 1,000.2 925,169 1

Nested Loop (cost=0.00..53,857.32 rows=925 width=24) (actual time=0.968..2,688.295 rows=925,169 loops=1)

  • Join Filter: (thread.read_roles ?| current_userroles.roles)
7. 0.011 0.011 ↑ 1.0 1 1

CTE Scan on current_userroles (cost=0.00..0.02 rows=1 width=32) (actual time=0.010..0.011 rows=1 loops=1)

8. 180.999 180.999 ↑ 1.0 925,169 1

Seq Scan on thread (cost=0.00..42,292.69 rows=925,169 width=105) (actual time=0.933..180.999 rows=925,169 loops=1)

  • Filter: (NOT anonymized)