explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xk5F : Fast

Settings
# exclusive inclusive rows x rows loops node
1. 104.793 4,016.920 ↑ 10.7 43 1

GroupAggregate (cost=55,347.16..55,366.71 rows=460 width=228) (actual time=3,868.806..4,016.920 rows=43 loops=1)

  • Group Key: sims.iccid, (("ts-values".value_meta ->> 'carrierCountryCode'::text))
  • Buffers: shared hit=2641 read=10604, temp read=2317 written=2321
2. 178.921 3,912.127 ↓ 147.1 67,687 1

Sort (cost=55,347.16..55,348.31 rows=460 width=279) (actual time=3,868.765..3,912.127 rows=67,687 loops=1)

  • Sort Key: sims.iccid, (("ts-values".value_meta ->> 'carrierCountryCode'::text))
  • Sort Method: external merge Disk: 18536kB
  • Buffers: shared hit=2641 read=10604, temp read=2317 written=2321
3. 74.044 3,733.206 ↓ 147.1 67,687 1

Hash Right Join (cost=1,083.99..55,326.82 rows=460 width=279) (actual time=1,790.751..3,733.206 rows=67,687 loops=1)

  • Hash Cond: (("ts-metrics".dimensions ->> 'iccid'::text) = (sims.iccid)::text)
  • Buffers: shared hit=2641 read=10604
4. 66.965 3,659.036 ↓ 1.1 68,084 1

Gather (cost=1,014.00..54,431.66 rows=64,699 width=268) (actual time=1,790.613..3,659.036 rows=68,084 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=2619 read=10604
5. 14.910 3,592.071 ↑ 1.2 22,695 3

Hash Join (cost=14.00..46,961.76 rows=26,958 width=268) (actual time=1,785.172..3,592.071 rows=22,695 loops=3)

  • Hash Cond: ("ts-values".metric_id = "ts-metrics".id)
  • Buffers: shared hit=5837 read=32763
6. 3,575.596 3,575.596 ↑ 1.2 22,695 3

Parallel Seq Scan on "ts-values" (cost=0.00..46,608.19 rows=26,958 width=178) (actual time=1,783.504..3,575.596 rows=22,695 loops=3)

  • Filter: (("timestamp" >= '2019-01-01 07:00:00+00'::timestamp with time zone) AND ("timestamp" <= '2019-01-07 06:59:59.999+00'::timestamp with time zone))
  • Rows Removed by Filter: 410678
  • Buffers: shared hit=5720 read=32763
7. 0.118 1.565 ↑ 1.0 311 3

Hash (cost=10.11..10.11 rows=311 width=98) (actual time=1.565..1.565 rows=311 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 48kB
  • Buffers: shared hit=21
8. 1.447 1.447 ↑ 1.0 311 3

Seq Scan on "ts-metrics" (cost=0.00..10.11 rows=311 width=98) (actual time=0.016..1.447 rows=311 loops=3)

  • Buffers: shared hit=21
9. 0.022 0.126 ↓ 10.8 43 1

Hash (cost=69.94..69.94 rows=4 width=73) (actual time=0.126..0.126 rows=43 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
  • Buffers: shared hit=22
10. 0.072 0.104 ↓ 10.8 43 1

Bitmap Heap Scan on sims (cost=4.70..69.94 rows=4 width=73) (actual time=0.052..0.104 rows=43 loops=1)

  • Recheck Cond: (("clientSlug")::text = 'global'::text)
  • Filter: (("providerSlug")::text = 'bell'::text)
  • Rows Removed by Filter: 14
  • Heap Blocks: exact=20
  • Buffers: shared hit=22
11. 0.032 0.032 ↑ 1.0 57 1

Bitmap Index Scan on sims_clientslug_index (cost=0.00..4.70 rows=57 width=0) (actual time=0.032..0.032 rows=57 loops=1)

  • Index Cond: (("clientSlug")::text = 'global'::text)
  • Buffers: shared hit=2