explain.depesz.com

PostgreSQL's explain analyze made readable

Result: czfn : by created ts

Settings
# exclusive inclusive rows x rows loops node
1. 63.970 2,246.387 ↓ 11.0 64,340 1

GroupAggregate (cost=216,130.16..216,438.23 rows=5,868 width=98) (actual time=2,090.945..2,246.387 rows=64,340 loops=1)

  • Group Key: c.team_company, a.odesk_team_user_id, d.contract_id
2. 427.347 2,182.417 ↓ 15.4 90,370 1

Sort (cost=216,130.16..216,144.83 rows=5,868 width=70) (actual time=2,090.922..2,182.417 rows=90,370 loops=1)

  • Sort Key: c.team_company, a.odesk_team_user_id, d.contract_id
  • Sort Method: external merge Disk: 6,880kB
3. 134.150 1,755.070 ↓ 15.4 90,370 1

Nested Loop (cost=0.87..215,762.86 rows=5,868 width=70) (actual time=6.652..1,755.070 rows=90,370 loops=1)

4. 67.214 1,349.810 ↓ 15.4 90,370 1

Nested Loop (cost=0.43..188,310.71 rows=5,868 width=56) (actual time=6.643..1,349.810 rows=90,370 loops=1)

5. 36.137 921.116 ↓ 15.4 90,370 1

Append (cost=0.00..139,800.76 rows=5,868 width=37) (actual time=6.631..921.116 rows=90,370 loops=1)

6. 0.004 0.004 ↓ 0.0 0 1

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

  • Filter: ((worked_date >= '2019-09-12'::date) AND (worked_date <= '2019-10-03'::date) AND ((minutes_offline IS NULL) OR (minutes_offline = 0)) AND (created_ts <@ tstzrange(('2019-09-26'::date)::timestamp with time zone, ('2019-09-27 00:00:00'::timestamp without time zone)::timestamp with time zone, '[)'::text)))
7. 884.975 884.975 ↓ 15.4 90,370 1

Seq Scan on part_data_contracttime_days_201909 d_1 (cost=0.00..139,800.76 rows=5,867 width=37) (actual time=6.626..884.975 rows=90,370 loops=1)

  • Filter: ((worked_date >= '2019-09-12'::date) AND (worked_date <= '2019-10-03'::date) AND ((minutes_offline IS NULL) OR (minutes_offline = 0)) AND (created_ts <@ tstzrange(('2019-09-26'::date)::timestamp with time zone, ('2019-09-27 00:00:00'::timestamp without time zone)::timestamp with time zone, '[)'::text)))
  • Rows Removed by Filter: 2,284,484
8. 361.480 361.480 ↑ 1.0 1 90,370

Index Scan using dim_assignments_pkey on dim_assignments a (cost=0.43..8.26 rows=1 width=27) (actual time=0.004..0.004 rows=1 loops=90,370)

  • Index Cond: (id = d.contract_id)
9. 271.110 271.110 ↑ 1.0 1 90,370

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

  • Index Cond: (id = a.company_id)