explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9fND : Fast

Settings
# exclusive inclusive rows x rows loops node
1. 98.054 1,705.402 ↑ 10.7 43 1

GroupAggregate (cost=55,347.16..55,366.71 rows=460 width=228) (actual time=1,563.460..1,705.402 rows=43 loops=1)

  • Group Key: sims.iccid, (("ts-values".value_meta ->> 'carrierCountryCode'::text))
2. 188.478 1,607.348 ↓ 147.1 67,687 1

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

  • Sort Key: sims.iccid, (("ts-values".value_meta ->> 'carrierCountryCode'::text))
  • Sort Method: external merge Disk: 18536kB
3. 73.643 1,418.870 ↓ 147.1 67,687 1

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

  • Hash Cond: (("ts-metrics".dimensions ->> 'iccid'::text) = (sims.iccid)::text)
4. 127.006 1,344.628 ↓ 1.1 68,081 1

Gather (cost=1,014.00..54,431.66 rows=64,699 width=268) (actual time=192.622..1,344.628 rows=68,081 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 19.168 1,217.622 ↑ 1.2 22,694 3

Hash Join (cost=14.00..46,961.76 rows=26,958 width=268) (actual time=126.545..1,217.622 rows=22,694 loops=3)

  • Hash Cond: ("ts-values".metric_id = "ts-metrics".id)
6. 1,198.233 1,198.233 ↑ 1.2 22,694 3

Parallel Seq Scan on "ts-values" (cost=0.00..46,608.19 rows=26,958 width=178) (actual time=122.538..1,198.233 rows=22,694 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
7. 0.113 0.221 ↑ 1.0 311 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 48kB
8. 0.108 0.108 ↑ 1.0 311 3

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

9. 0.023 0.599 ↓ 10.8 43 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
10. 0.072 0.576 ↓ 10.8 43 1

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

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

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

  • Index Cond: (("clientSlug")::text = 'global'::text)