explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VYzs

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 596.822 ↑ 1.0 8 1

Limit (cost=188,716.81..188,716.83 rows=8 width=1,709) (actual time=596.816..596.822 rows=8 loops=1)

2. 0.037 596.818 ↑ 1,028.9 8 1

Sort (cost=188,716.81..188,737.39 rows=8,231 width=1,709) (actual time=596.816..596.818 rows=8 loops=1)

  • Sort Key: t."timestamp" DESC
  • Sort Method: quicksort Memory: 36kB
3. 0.065 596.781 ↑ 914.6 9 1

Nested Loop Left Join (cost=73,989.47..188,552.19 rows=8,231 width=1,709) (actual time=522.488..596.781 rows=9 loops=1)

4. 27.241 596.545 ↑ 914.6 9 1

Hash Left Join (cost=73,988.92..135,613.05 rows=8,231 width=1,318) (actual time=522.459..596.545 rows=9 loops=1)

  • Hash Cond: (t."blockId" = b.id)
5. 200.825 441.170 ↑ 914.6 9 1

Hash Right Join (cost=50,096.40..105,301.35 rows=8,231 width=1,314) (actual time=394.147..441.170 rows=9 loops=1)

  • Hash Cond: (so.id = t.id)
6. 103.345 103.345 ↑ 1.0 506,300 1

Seq Scan on stake_orders so (cost=0.00..19,537.00 rows=506,300 width=236) (actual time=0.010..103.345 rows=506,300 loops=1)

7. 0.075 137.000 ↑ 914.6 9 1

Hash (cost=48,883.51..48,883.51 rows=8,231 width=1,078) (actual time=137.000..137.000 rows=9 loops=1)

  • Buckets: 4096 Batches: 4 Memory Usage: 33kB
8. 28.672 136.925 ↑ 914.6 9 1

Merge Right Join (cost=27,944.27..48,883.51 rows=8,231 width=1,078) (actual time=81.561..136.925 rows=9 loops=1)

  • Merge Cond: ((ref.address)::text = (t."senderId")::text)
9. 108.135 108.135 ↑ 1.0 242,615 1

Index Scan using referals_pkey on referals ref (cost=0.42..20,180.77 rows=245,936 width=348) (actual time=0.009..108.135 rows=242,615 loops=1)

10. 0.007 0.118 ↑ 914.6 9 1

Materialize (cost=27,943.85..27,985.01 rows=8,231 width=753) (actual time=0.111..0.118 rows=9 loops=1)

11. 0.016 0.111 ↑ 914.6 9 1

Sort (cost=27,943.85..27,964.43 rows=8,231 width=753) (actual time=0.110..0.111 rows=9 loops=1)

  • Sort Key: t."senderId
  • Sort Method: quicksort Memory: 29kB
12. 0.048 0.095 ↑ 914.6 9 1

Bitmap Heap Scan on trs t (cost=454.83..24,650.56 rows=8,231 width=753) (actual time=0.057..0.095 rows=9 loops=1)

  • Recheck Cond: ((("recipientId")::text = 'DDK2131491563291774976'::text) OR (encode("senderPublicKey", 'hex'::text) = 'd8428c8050f29cbaf4ffbe2bcd4a3dfec45758783d793e40fe2152e8e7e3f7c4'::text))
  • Heap Blocks: exact=9
13. 0.001 0.047 ↓ 0.0 0 1

BitmapOr (cost=454.83..454.83 rows=8,231 width=0) (actual time=0.047..0.047 rows=0 loops=1)

14. 0.025 0.025 ↑ 1.0 6 1

Bitmap Index Scan on trs_upper_recipient_id (cost=0.00..4.47 rows=6 width=0) (actual time=0.025..0.025 rows=6 loops=1)

  • Index Cond: (("recipientId")::text = 'DDK2131491563291774976'::text)
15. 0.021 0.021 ↑ 1,370.8 6 1

Bitmap Index Scan on trs_encode_senderpublickey (cost=0.00..446.24 rows=8,225 width=0) (actual time=0.021..0.021 rows=6 loops=1)

  • Index Cond: (encode("senderPublicKey", 'hex'::text) = 'd8428c8050f29cbaf4ffbe2bcd4a3dfec45758783d793e40fe2152e8e7e3f7c4'::text)
16. 72.726 128.134 ↑ 1.0 307,490 1

Hash (cost=16,444.90..16,444.90 rows=307,490 width=69) (actual time=128.134..128.134 rows=307,490 loops=1)

  • Buckets: 65536 Batches: 16 Memory Usage: 2405kB
17. 55.408 55.408 ↑ 1.0 307,490 1

Seq Scan on blocks b (cost=0.00..16,444.90 rows=307,490 width=69) (actual time=0.007..55.408 rows=307,490 loops=1)

18. 0.171 0.171 ↓ 0.0 0 9

Index Scan using votes_transactionid_pk on votes v (cost=0.55..6.41 rows=1 width=523) (actual time=0.019..0.019 rows=0 loops=9)

  • Index Cond: ("transactionId" = t.id)