explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bz4HD : contract ts

Settings
# exclusive inclusive rows x rows loops node
1. 23.855 1,008.317 ↓ 6.4 10,325 1

GroupAggregate (cost=161,011.98..161,096.71 rows=1,614 width=98) (actual time=977.341..1,008.317 rows=10,325 loops=1)

  • Group Key: c.team_company, a.odesk_team_user_id, d.contract_id
2. 107.843 984.462 ↓ 12.7 20,553 1

Sort (cost=161,011.98..161,016.01 rows=1,614 width=70) (actual time=977.307..984.462 rows=20,553 loops=1)

  • Sort Key: c.team_company, a.odesk_team_user_id, d.contract_id
  • Sort Method: external merge Disk: 2,680kB
3. 13.074 876.619 ↓ 12.7 20,553 1

Nested Loop (cost=0.87..160,925.98 rows=1,614 width=70) (actual time=0.831..876.619 rows=20,553 loops=1)

4. 12.920 781.333 ↓ 12.7 20,553 1

Nested Loop (cost=0.43..153,375.24 rows=1,614 width=56) (actual time=0.824..781.333 rows=20,553 loops=1)

5. 8.900 686.201 ↓ 12.7 20,553 1

Append (cost=0.00..139,800.76 rows=1,614 width=37) (actual time=0.814..686.201 rows=20,553 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.003..0.004 rows=0 loops=1)

  • Filter: ((worked_date >= '2019-09-02'::date) AND (worked_date <= '2019-09-23'::date) AND (minutes_offline > 0) AND (created_ts <@ tstzrange(('2019-09-16'::date)::timestamp with time zone, ('2019-09-17 00:00:00'::timestamp without time zone)::timestamp with time zone, '[)'::text)))
7. 677.297 677.297 ↓ 12.7 20,553 1

Seq Scan on part_data_contracttime_days_201909 d_1 (cost=0.00..139,800.76 rows=1,613 width=37) (actual time=0.810..677.297 rows=20,553 loops=1)

  • Filter: ((worked_date >= '2019-09-02'::date) AND (worked_date <= '2019-09-23'::date) AND (minutes_offline > 0) AND (created_ts <@ tstzrange(('2019-09-16'::date)::timestamp with time zone, ('2019-09-17 00:00:00'::timestamp without time zone)::timestamp with time zone, '[)'::text)))
  • Rows Removed by Filter: 2,354,626
8. 82.212 82.212 ↑ 1.0 1 20,553

Index Scan using dim_assignments_pkey on dim_assignments a (cost=0.43..8.40 rows=1 width=27) (actual time=0.003..0.004 rows=1 loops=20,553)

  • Index Cond: (id = d.contract_id)
9. 82.212 82.212 ↑ 1.0 1 20,553

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=20,553)

  • Index Cond: (id = a.company_id)