explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9MGA

Settings
# exclusive inclusive rows x rows loops node
1. 0.860 48.680 ↓ 9.5 953 1

Sort (cost=113.80..114.05 rows=100 width=72) (actual time=48.576..48.680 rows=953 loops=1)

  • Sort Key: (sum(((jb.value ->> 'usage'::text))::integer)) DESC
  • Sort Method: quicksort Memory: 136kB
2. 13.513 47.820 ↓ 9.5 953 1

HashAggregate (cost=108.98..110.48 rows=100 width=72) (actual time=47.190..47.820 rows=953 loops=1)

  • Group Key: (jb.value ->> 'app'::text), COALESCE(package_data.label, ((jb.value ->> 'app'::text))::character varying)
3. 5.816 34.307 ↓ 82.0 8,201 1

Nested Loop (cost=2.40..107.48 rows=100 width=96) (actual time=19.044..34.307 rows=8,201 loops=1)

4. 0.043 0.043 ↑ 1.0 1 1

Index Scan using idx_log_data_start_time_copy1 on log_data_daily ld (cost=0.15..8.17 rows=1 width=18) (actual time=0.038..0.043 rows=1 loops=1)

  • Index Cond: ((start_time >= 1569007800) AND (start_time <= 1569094199))
5. 8.513 28.448 ↓ 82.0 8,201 1

Hash Join (cost=2.25..97.81 rows=100 width=56) (actual time=18.993..28.448 rows=8,201 loops=1)

  • Hash Cond: ((package_data.package_name)::text = (jb.value ->> 'app'::text))
6. 0.987 0.987 ↓ 1.0 2,118 1

Seq Scan on package_data (cost=0.00..84.04 rows=2,104 width=48) (actual time=0.016..0.987 rows=2,118 loops=1)

7. 9.670 18.948 ↓ 84.3 8,427 1

Hash (cost=1.00..1.00 rows=100 width=32) (actual time=18.948..18.948 rows=8,427 loops=1)

  • Buckets: 16384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 992kB
8. 9.278 9.278 ↓ 84.3 8,427 1

Function Scan on jsonb_array_elements jb (cost=0.00..1.00 rows=100 width=32) (actual time=7.297..9.278 rows=8,427 loops=1)

Planning time : 0.665 ms
Execution time : 49.396 ms