explain.depesz.com

PostgreSQL's explain analyze made readable

Result: F2ZVR

Settings
# exclusive inclusive rows x rows loops node
1. 7.429 630.855 ↓ 13.7 8,230 1

GroupAggregate (cost=147,731.30..147,747.86 rows=602 width=98) (actual time=619.717..630.855 rows=8,230 loops=1)

  • Group Key: c.team_company, a.odesk_team_user_id, d.contract_id
2. 32.758 623.426 ↓ 19.6 11,778 1

Sort (cost=147,731.30..147,732.81 rows=602 width=51) (actual time=619.697..623.426 rows=11,778 loops=1)

  • Sort Key: c.team_company, a.odesk_team_user_id, d.contract_id
  • Sort Method: quicksort Memory: 1,986kB
3. 6.475 590.668 ↓ 19.6 11,778 1

Nested Loop (cost=0.87..147,703.51 rows=602 width=51) (actual time=2.377..590.668 rows=11,778 loops=1)

4. 8.291 537.081 ↓ 19.6 11,778 1

Nested Loop (cost=0.43..144,887.18 rows=602 width=37) (actual time=2.370..537.081 rows=11,778 loops=1)

5. 5.069 481.678 ↓ 19.6 11,778 1

Append (cost=0.00..139,800.76 rows=602 width=18) (actual time=2.358..481.678 rows=11,778 loops=1)

6. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on data_contracttime_days d (cost=0.00..0.00 rows=1 width=18) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: ((worked_date >= '2019-09-10'::date) AND (worked_date <= '2019-09-17'::date) AND (minutes_offline > 0) AND (created_ts <@ tstzrange(('2019-09-17'::date)::timestamp with time zone, ('2019-09-18 00:00:00'::timestamp without time zone)::timestamp with time zone, '[)'::text)))
7. 476.606 476.606 ↓ 19.6 11,778 1

Seq Scan on part_data_contracttime_days_201909 d_1 (cost=0.00..139,800.76 rows=601 width=18) (actual time=2.354..476.606 rows=11,778 loops=1)

  • Filter: ((worked_date >= '2019-09-10'::date) AND (worked_date <= '2019-09-17'::date) AND (minutes_offline > 0) AND (created_ts <@ tstzrange(('2019-09-17'::date)::timestamp with time zone, ('2019-09-18 00:00:00'::timestamp without time zone)::timestamp with time zone, '[)'::text)))
  • Rows Removed by Filter: 2,365,109
8. 47.112 47.112 ↑ 1.0 1 11,778

Index Scan using dim_assignments_pkey on dim_assignments a (cost=0.43..8.44 rows=1 width=27) (actual time=0.003..0.004 rows=1 loops=11,778)

  • Index Cond: (id = d.contract_id)
9. 47.112 47.112 ↑ 1.0 1 11,778

Index Scan using dim_companies_pkey on dim_companies c (cost=0.43..4.67 rows=1 width=30) (actual time=0.003..0.004 rows=1 loops=11,778)

  • Index Cond: (id = a.company_id)
Planning time : 8.000 ms
Execution time : 632.670 ms