explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6oC3 : Optimization for: Test; plan #Ef7d

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 746.047 ↓ 9.0 9 1

Hash Join (cost=111,858.96..221,927.45 rows=1 width=70) (actual time=745.803..746.047 rows=9 loops=1)

  • Hash Cond: ((cdh."timestamp" = mxtmp."timestamp") AND ((cdh.metric_name)::text = (mxtmp.metric_name)::text))
2. 0.000 53.485 ↓ 3.3 3,569 1

Gather (cost=1,000.00..110,777.17 rows=1,069 width=78) (actual time=1.011..53.485 rows=3,569 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 250.465 250.465 ↓ 2.7 714 5

Parallel Seq Scan on conf_data_history cdh (cost=0.00..109,670.27 rows=267 width=78) (actual time=2.893..250.465 rows=714 loops=5)

  • Filter: ((resource_id)::text = 'i-0412f9f2a52cb1575'::text)
  • Rows Removed by Filter: 1298643
4. 0.008 726.110 ↑ 118.4 9 1

Hash (cost=110,842.97..110,842.97 rows=1,066 width=60) (actual time=726.109..726.110 rows=9 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 17kB
5. 0.002 726.102 ↑ 118.4 9 1

Subquery Scan on mxtmp (cost=110,681.09..110,842.97 rows=1,066 width=60) (actual time=725.605..726.102 rows=9 loops=1)

6. 0.000 726.100 ↑ 118.4 9 1

Finalize GroupAggregate (cost=110,681.09..110,832.31 rows=1,066 width=60) (actual time=725.604..726.100 rows=9 loops=1)

  • Group Key: cdh1.resource_id, cdh1.metric_name
7. 0.334 726.165 ↑ 118.7 9 1

Gather Merge (cost=110,681.09..110,813.64 rows=1,068 width=60) (actual time=725.524..726.165 rows=9 loops=1)

  • Workers Planned: 4
  • Workers Launched: 0
8. 0.500 725.831 ↑ 29.7 9 1

Partial GroupAggregate (cost=109,681.04..109,686.38 rows=267 width=60) (actual time=725.261..725.831 rows=9 loops=1)

  • Group Key: cdh1.resource_id, cdh1.metric_name
9. 1.139 725.331 ↓ 13.4 3,569 1

Sort (cost=109,681.04..109,681.70 rows=267 width=60) (actual time=725.178..725.331 rows=3,569 loops=1)

  • Sort Key: cdh1.metric_name
  • Sort Method: quicksort Memory: 375kB
10. 724.192 724.192 ↓ 13.4 3,569 1

Parallel Seq Scan on conf_data_history cdh1 (cost=0.00..109,670.27 rows=267 width=60) (actual time=0.635..724.192 rows=3,569 loops=1)

  • Filter: ((resource_id)::text = 'i-0412f9f2a52cb1575'::text)
  • Rows Removed by Filter: 6493214