explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jsRK

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 274.496 ↑ 1.0 51 1

Limit (cost=19,422.25..19,422.38 rows=51 width=24) (actual time=274.486..274.496 rows=51 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.001..0.001 rows=1 loops=1)

4. 6.512 274.492 ↑ 1.4 51 1

Sort (cost=19,422.24..19,422.42 rows=69 width=24) (actual time=274.486..274.492 rows=51 loops=1)

  • Sort Key: thread.date_updated DESC NULLS LAST, thread.id DESC NULLS LAST
  • Sort Method: top-N heapsort Memory: 28kB
5. 34.830 267.980 ↓ 989.5 68,278 1

HashAggregate (cost=19,419.45..19,420.14 rows=69 width=24) (actual time=255.822..267.980 rows=68,278 loops=1)

  • Group Key: thread.id
6. 209.481 233.150 ↓ 989.5 68,278 1

Nested Loop (cost=1,476.04..19,419.27 rows=69 width=24) (actual time=8.224..233.150 rows=68,278 loops=1)

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

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

8. 15.926 23.665 ↑ 1.0 68,278 1

Bitmap Heap Scan on thread (cost=1,476.04..18,551.43 rows=69,426 width=124) (actual time=8.200..23.665 rows=68,278 loops=1)

  • Recheck Cond: ((date_updated >= '2020-02-04 16:42:08.266428+00'::timestamp with time zone) AND (date_updated < '2020-08-04 15:42:09.265332+00'::timestamp with time zone))
  • Filter: (NOT anonymized)
  • Heap Blocks: exact=3,333
9. 7.739 7.739 ↑ 1.0 68,278 1

Bitmap Index Scan on idx_thread_date_updated (cost=0.00..1,458.68 rows=69,426 width=0) (actual time=7.739..7.739 rows=68,278 loops=1)

  • Index Cond: ((date_updated >= '2020-02-04 16:42:08.266428+00'::timestamp with time zone) AND (date_updated < '2020-08-04 15:42:09.265332+00'::timestamp with time zone))
Planning time : 0.197 ms
Execution time : 275.184 ms