explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mfq1

Settings
# exclusive inclusive rows x rows loops node
1. 0.954 348.172 ↑ 4.0 1 1

GroupAggregate (cost=1,634.89..56,627.29 rows=4 width=126) (actual time=348.172..348.172 rows=1 loops=1)

  • Group Key: org.name
2. 15.661 347.218 ↓ 131.2 13,642 1

Gather (cost=1,634.89..56,626.73 rows=104 width=122) (actual time=161.151..347.218 rows=13,642 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.188 331.557 ↓ 105.7 4,547 3 / 3

Hash Join (cost=634.89..55,616.33 rows=43 width=122) (actual time=151.593..331.557 rows=4,547 loops=3)

  • Hash Cond: (usage_fact.app_id = app_dim.id)
4. 30.621 330.349 ↓ 55.0 9,507 3 / 3

Hash Join (cost=633.83..55,614.71 rows=173 width=126) (actual time=150.408..330.349 rows=9,507 loops=3)

  • Hash Cond: (usage_fact.org_id = org.organisation_id)
5. 202.677 299.587 ↓ 12.1 469,380 3 / 3

Hash Join (cost=604.58..55,483.03 rows=38,836 width=12) (actual time=149.140..299.587 rows=469,380 loops=3)

  • Hash Cond: (usage_fact.date_id = date_dim.date_id)
6. 90.050 90.050 ↑ 1.3 1,253,286 3 / 3

Parallel Seq Scan on usage_fact (cost=0.00..50,766.08 rows=1,566,608 width=36) (actual time=0.003..90.050 rows=1,253,286 loops=3)

7. 2.413 6.860 ↓ 1.1 12,001 3 / 3

Hash (cost=463.36..463.36 rows=11,297 width=8) (actual time=6.860..6.860 rows=12,001 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 597kB
8. 4.447 4.447 ↓ 1.1 12,001 3 / 3

Index Scan using idx_date_dim_1 on date_dim (cost=0.42..463.36 rows=11,297 width=8) (actual time=0.033..4.447 rows=12,001 loops=3)

  • Index Cond: ((date >= '2020-01-01 00:00:00'::timestamp without time zone) AND (date <= '2020-05-05 00:00:00'::timestamp without time zone))
9. 0.003 0.141 ↑ 4.0 1 3 / 3

Hash (cost=29.20..29.20 rows=4 width=122) (actual time=0.141..0.141 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.138 0.138 ↑ 4.0 1 3 / 3

Seq Scan on organisation org (cost=0.00..29.20 rows=4 width=122) (actual time=0.100..0.138 rows=1 loops=3)

  • Filter: ((name)::text = 'Hertfordshire'::text)
  • Rows Removed by Filter: 675
11. 0.004 0.020 ↑ 1.0 1 3 / 3

Hash (cost=1.05..1.05 rows=1 width=4) (actual time=0.020..0.020 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.016 0.016 ↑ 1.0 1 3 / 3

Seq Scan on app_dim (cost=0.00..1.05 rows=1 width=4) (actual time=0.015..0.016 rows=1 loops=3)

  • Filter: ((app)::text = 'TM'::text)
  • Rows Removed by Filter: 3
Planning time : 0.584 ms
Execution time : 349.850 ms