explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zth2 : contract ts

Settings
# exclusive inclusive rows x rows loops node
1. 7.336 870.015 ↓ 5.1 8,230 1

GroupAggregate (cost=161,206.00..161,250.79 rows=1,629 width=98) (actual time=859.462..870.015 rows=8,230 loops=1)

  • Group Key: c.team_company, a.odesk_team_user_id, d.contract_id
2. 32.632 862.679 ↓ 7.2 11,778 1

Sort (cost=161,206.00..161,210.07 rows=1,629 width=51) (actual time=859.446..862.679 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. 9.411 830.047 ↓ 7.2 11,778 1

Nested Loop (cost=0.87..161,119.09 rows=1,629 width=51) (actual time=2.509..830.047 rows=11,778 loops=1)

4. 11.816 773.524 ↓ 7.2 11,778 1

Nested Loop (cost=0.43..153,498.17 rows=1,629 width=37) (actual time=2.501..773.524 rows=11,778 loops=1)

5. 5.603 714.596 ↓ 7.2 11,778 1

Append (cost=0.00..139,800.76 rows=1,629 width=18) (actual time=2.489..714.596 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-03'::date) AND (worked_date <= '2019-09-24'::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. 708.990 708.990 ↓ 7.2 11,778 1

Seq Scan on part_data_contracttime_days_201909 d_1 (cost=0.00..139,800.76 rows=1,628 width=18) (actual time=2.486..708.990 rows=11,778 loops=1)

  • Filter: ((worked_date >= '2019-09-03'::date) AND (worked_date <= '2019-09-24'::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,364,448
8. 47.112 47.112 ↑ 1.0 1 11,778

Index Scan using dim_assignments_pkey on dim_assignments a (cost=0.43..8.40 rows=1 width=27) (actual time=0.004..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)