explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qjfm

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 59.037 ↑ 61.2 6 1

Sort (cost=13,589.69..13,590.61 rows=367 width=137) (actual time=59.036..59.037 rows=6 loops=1)

  • Sort Key: ranked_messages.max_rank_value DESC, ranked_messages.rank_value DESC
  • Sort Method: quicksort Memory: 26kB
2. 0.336 59.017 ↑ 61.2 6 1

Subquery Scan on ranked_messages (cost=13,144.36..13,574.06 rows=367 width=137) (actual time=58.698..59.017 rows=6 loops=1)

  • Filter: (ranked_messages.rank <= 4)
  • Rows Removed by Filter: 2
3. 0.053 58.681 ↑ 137.8 8 1

WindowAgg (cost=13,144.36..13,367.52 rows=1,102 width=196) (actual time=58.646..58.681 rows=8 loops=1)

4. 0.000 58.628 ↑ 137.8 8 1

Sort (cost=13,144.36..13,147.12 rows=1,102 width=168) (actual time=58.626..58.628 rows=8 loops=1)

  • Sort Key: backlog.bufferid, ((((CASE WHEN (backlog.type = ANY ('{1,4}'::integer[])) THEN 1.0 WHEN (backlog.type = ANY ('{2,1024,2048,4096,16384}'::integer[])) THEN 0.8 WHEN (backlog.type = ANY ('{32,64,128,256,512,32768,65536}'::integer[])) THEN 0.6 WHEN (backlog.type = ANY ('{8,16,8192,131072}'::integer[])) THEN 0.4 ELSE 0.2 END ^ '32'::numeric))::double precision * (('1'::double precision / (date_part('epoch'::text, CURRENT_TIMESTAMP) - date_part('epoch'::text, backlog."time"))) ^ '1'::double precision))) DESC
  • Sort Method: quicksort Memory: 27kB
5. 54.783 72.164 ↑ 137.8 8 1

Gather (cost=2,374.48..13,088.68 rows=1,102 width=168) (actual time=6.275..72.164 rows=8 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
6. 0.057 17.381 ↑ 162.0 4 2 / 2

Nested Loop (cost=1,374.48..11,978.48 rows=648 width=168) (actual time=3.151..17.381 rows=4 loops=2)

7. 0.116 17.280 ↑ 162.0 4 2 / 2

Hash Join (cost=1,374.05..6,632.19 rows=648 width=121) (actual time=3.127..17.280 rows=4 loops=2)

  • Hash Cond: (buffer.networkid = network.networkid)
8. 0.024 17.084 ↑ 162.0 4 2 / 2

Hash Join (cost=1,362.96..6,553.88 rows=648 width=84) (actual time=2.935..17.084 rows=4 loops=2)

  • Hash Cond: (backlog.bufferid = buffer.bufferid)
9. 14.522 16.458 ↑ 191.2 4 2 / 2

Parallel Bitmap Heap Scan on backlog (cost=1,178.08..6,366.89 rows=765 width=71) (actual time=2.318..16.458 rows=4 loops=2)

  • Recheck Cond: ((tsv @@ '''abseilen'''::tsquery) AND ((type & 23559) > 0))
  • Heap Blocks: exact=8
10. 1.936 1.936 ↑ 162.6 8 1 / 2

Bitmap Index Scan on backlog_tsv_filtered_idx (cost=0.00..1,177.76 rows=1,301 width=0) (actual time=3.872..3.872 rows=8 loops=1)

  • Index Cond: (tsv @@ '''abseilen'''::tsquery)
11. 0.217 0.602 ↑ 1.0 675 2 / 2

Hash (cost=115.69..115.69 rows=675 width=17) (actual time=0.601..0.602 rows=675 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 42kB
12. 0.385 0.385 ↑ 1.0 675 2 / 2

Seq Scan on buffer (cost=0.00..115.69 rows=675 width=17) (actual time=0.014..0.385 rows=675 loops=2)

  • Filter: (userid = 2)
  • Rows Removed by Filter: 122
13. 0.022 0.080 ↑ 1.0 33 2 / 2

Hash (cost=7.70..7.70 rows=33 width=45) (actual time=0.080..0.080 rows=33 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
14. 0.013 0.058 ↑ 1.0 33 2 / 2

Nested Loop (cost=0.00..7.70 rows=33 width=45) (actual time=0.045..0.058 rows=33 loops=2)

15. 0.012 0.012 ↑ 1.0 1 2 / 2

Function Scan on query (cost=0.00..0.10 rows=1 width=32) (actual time=0.012..0.012 rows=1 loops=2)

16. 0.033 0.033 ↑ 1.0 33 2 / 2

Seq Scan on network (cost=0.00..4.30 rows=33 width=13) (actual time=0.028..0.033 rows=33 loops=2)

17. 0.044 0.044 ↑ 1.0 1 8 / 2

Index Scan using sender_pkey on sender (cost=0.43..8.21 rows=1 width=55) (actual time=0.011..0.011 rows=1 loops=8)

  • Index Cond: (senderid = backlog.senderid)
Planning time : 3.351 ms
Execution time : 72.741 ms