explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a2O6

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 3,373.589 ↑ 1.0 101 1

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

2.          

CTE current_userroles

3. 0.001 0.001 ↑ 1.0 1 1

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

4. 82.339 3,373.586 ↑ 9.2 101 1

Sort (cost=53,904.30..53,906.62 rows=925 width=24) (actual time=3,373.575..3,373.586 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. 670.484 3,291.247 ↓ 1,000.2 925,169 1

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

  • Group Key: thread.id
6. 2,448.326 2,620.763 ↓ 1,000.2 925,169 1

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

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

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

8. 172.432 172.432 ↑ 1.0 925,169 1

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

  • Filter: (NOT anonymized)