explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TxdS

Settings
# exclusive inclusive rows x rows loops node
1. 65,764.800 859,984.534 ↓ 1.5 5,482,675 1

Hash Join (cost=7,154,317.39..11,444,896.93 rows=3,726,618 width=92) (actual time=193,321.362..859,984.534 rows=5,482,675 loops=1)

  • Hash Cond: (r.id = ro.rpi_id)
  • Buffers: shared hit=81,408,077 read=3,034,656 dirtied=4,499
2. 600,920.982 600,920.982 ↑ 1.0 61,946,152 1

Index Scan using rpi_pkey on rpi r (cost=0.57..4,066,992.90 rows=62,283,995 width=30) (actual time=0.044..600,920.982 rows=61,946,152 loops=1)

  • Filter: (type = 2)
  • Rows Removed by Filter: 30,601,817
  • Buffers: shared hit=64,965,975 read=2,241,505 dirtied=4,499
3. 5,269.880 193,298.752 ↓ 1.9 10,087,124 1

Hash (cost=7,089,625.71..7,089,625.71 rows=5,175,289 width=8) (actual time=193,298.751..193,298.752 rows=10,087,124 loops=1)

  • Buckets: 16,777,216 (originally 8388608) Batches: 1 (originally 1) Memory Usage: 525,101kB
  • Buffers: shared hit=16,442,102 read=793,151
4. 23,562.201 188,028.872 ↓ 1.9 10,087,124 1

HashAggregate (cost=7,037,872.82..7,089,625.71 rows=5,175,289 width=8) (actual time=182,694.519..188,028.872 rows=10,087,124 loops=1)

  • Group Key: ro.rpi_id
  • Buffers: shared hit=16,442,102 read=793,151
5. 164,466.671 164,466.671 ↓ 1.1 16,025,803 1

Index Scan using idx_rpi_operation_operation_date on rpi_operation ro (cost=0.57..7,001,067.06 rows=14,722,305 width=8) (actual time=48.145..164,466.671 rows=16,025,803 loops=1)

  • Index Cond: ((operation_date >= '2018-11-01 00:00:00+03'::timestamp with time zone) AND (operation_date <= '2018-12-01 00:00:00+03'::timestamp with time zone))
  • Filter: (type_id = 8)
  • Rows Removed by Filter: 81,821,394
  • Buffers: shared hit=16,442,102 read=793,151
Planning time : 0.628 ms
Execution time : 860,714.209 ms