explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UfjP : Slow

Settings
# exclusive inclusive rows x rows loops node
1. 99.084 6,571.374 ↑ 10.5 43 1

GroupAggregate (cost=90,291.64..90,310.81 rows=451 width=228) (actual time=6,341.872..6,571.374 rows=43 loops=1)

  • Group Key: sims.iccid, (("ts-values".value_meta ->> 'carrierCountryCode'::text))
2. 313.295 6,472.290 ↓ 149.8 67,565 1

Sort (cost=90,291.64..90,292.77 rows=451 width=279) (actual time=6,341.824..6,472.290 rows=67,565 loops=1)

  • Sort Key: sims.iccid, (("ts-values".value_meta ->> 'carrierCountryCode'::text))
  • Sort Method: external merge Disk: 18504kB
3. 73.643 6,158.995 ↓ 149.8 67,565 1

Hash Right Join (cost=1,071.01..90,271.76 rows=451 width=279) (actual time=753.611..6,158.995 rows=67,565 loops=1)

  • Hash Cond: (("ts-metrics".dimensions ->> 'iccid'::text) = (sims.iccid)::text)
4. 67.255 6,084.876 ↓ 1.1 67,959 1

Gather (cost=1,013.00..89,406.40 rows=63,302 width=268) (actual time=753.120..6,084.876 rows=67,959 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 15.634 6,017.621 ↑ 1.2 22,653 3

Hash Join (cost=13.00..82,076.20 rows=26,376 width=268) (actual time=746.908..6,017.621 rows=22,653 loops=3)

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

Parallel Seq Scan on "ts-values" (cost=0.00..81,730.96 rows=26,376 width=178) (actual time=746.562..6,001.782 rows=22,653 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.109 0.205 ↑ 1.0 311 3

Hash (cost=9.11..9.11 rows=311 width=98) (actual time=0.205..0.205 rows=311 loops=3)

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

Seq Scan on "ts-metrics" (cost=0.00..9.11 rows=311 width=98) (actual time=0.010..0.096 rows=311 loops=3)

9. 0.022 0.476 ↓ 10.8 43 1

Hash (cost=57.96..57.96 rows=4 width=73) (actual time=0.476..0.476 rows=43 loops=1)

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

Index Scan using sims_clientslug_index on sims (cost=0.28..57.96 rows=4 width=73) (actual time=0.407..0.454 rows=43 loops=1)

  • Index Cond: (("clientSlug")::text = 'global'::text)
  • Filter: (("providerSlug")::text = 'bell'::text)
  • Rows Removed by Filter: 14