explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qCri

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.019 1.975 ↓ 2.0 26 1

Nested Loop (cost=15.01..105.87 rows=13 width=52) (actual time=0.242..1.975 rows=26 loops=1)

  • Join Filter: (position_metric.job_id = rollup_job.id)
  • Rows Removed by Join Filter: 104
2. 0.008 0.060 ↓ 2.0 2 1

Hash Join (cost=3.80..5.27 rows=1 width=8) (actual time=0.056..0.060 rows=2 loops=1)

  • Hash Cond: (rollup_analysis.id = rollup_job.rollup_analysis_id)
3. 0.011 0.011 ↑ 5.0 4 1

Seq Scan on rollup_analysis (cost=0.00..1.38 rows=20 width=4) (actual time=0.009..0.011 rows=4 loops=1)

  • Filter: (((structure_name)::text = 'position_metric_test'::text) AND ((analysis_currency)::text = 'USD'::text))
  • Rows Removed by Filter: 1
4. 0.001 0.041 ↓ 1.5 3 1

Hash (cost=3.77..3.77 rows=2 width=12) (actual time=0.041..0.041 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
5. 0.010 0.040 ↓ 1.5 3 1

Hash Join (cost=2.68..3.77 rows=2 width=12) (actual time=0.038..0.040 rows=3 loops=1)

  • Hash Cond: ((rollup_job.in_force_date = rollup_job_1.in_force_date) AND (rollup_job.end_time = (max(rollup_job_1.end_time))))
6. 0.004 0.004 ↑ 1.0 5 1

Seq Scan on rollup_job (cost=0.00..1.05 rows=5 width=20) (actual time=0.003..0.004 rows=5 loops=1)

7. 0.001 0.026 ↑ 1.5 2 1

Hash (cost=2.64..2.64 rows=3 width=12) (actual time=0.026..0.026 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.005 0.025 ↑ 1.5 2 1

HashAggregate (cost=2.58..2.61 rows=3 width=12) (actual time=0.025..0.025 rows=2 loops=1)

  • Group Key: rollup_job_1.in_force_date
9. 0.009 0.020 ↑ 1.0 4 1

Hash Join (cost=1.11..2.56 rows=4 width=12) (actual time=0.018..0.020 rows=4 loops=1)

  • Hash Cond: (rollup_analysis_1.id = rollup_job_1.rollup_analysis_id)
10. 0.004 0.004 ↑ 5.0 5 1

Seq Scan on rollup_analysis rollup_analysis_1 (cost=0.00..1.31 rows=25 width=4) (actual time=0.003..0.004 rows=5 loops=1)

  • Filter: ((analysis_currency)::text = 'USD'::text)
11. 0.002 0.007 ↑ 1.0 4 1

Hash (cost=1.06..1.06 rows=4 width=16) (actual time=0.007..0.007 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.005 0.005 ↑ 1.0 4 1

Seq Scan on rollup_job rollup_job_1 (cost=0.00..1.06 rows=4 width=16) (actual time=0.003..0.005 rows=4 loops=1)

  • Filter: (in_force_date = ANY ('{2018-10-29,2018-11-29}'::date[]))
  • Rows Removed by Filter: 1
13. 1.002 1.896 ↓ 5.0 65 2

Hash Join (cost=11.21..100.44 rows=13 width=52) (actual time=0.139..0.948 rows=65 loops=2)

  • Hash Cond: (return_period_losses.position_metric_id = position_metric.id)
14. 0.838 0.838 ↑ 1.0 4,680 2

Seq Scan on return_period_losses (cost=0.00..76.80 rows=4,680 width=16) (actual time=0.004..0.419 rows=4,680 loops=2)

15. 0.002 0.056 ↓ 5.0 5 1

Hash (cost=11.20..11.20 rows=1 width=44) (actual time=0.056..0.056 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.054 0.054 ↓ 5.0 5 1

Seq Scan on position_metric (cost=0.00..11.20 rows=1 width=44) (actual time=0.011..0.054 rows=5 loops=1)

  • Filter: (((peril)::text = 'Earthquake'::text) AND ((country)::text = 'United States'::text) AND (lower((metric)::text) = 'aep'::text))
  • Rows Removed by Filter: 355
Planning time : 0.548 ms