explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cHqg

Settings
# exclusive inclusive rows x rows loops node
1. 0.042 21.565 ↓ 6.0 6 1

GroupAggregate (cost=31,441.28..31,441.35 rows=1 width=332) (actual time=21.543..21.565 rows=6 loops=1)

  • Group Key: slr_taxes_reestr.period_date, slr_employee.candidate_id, slr_in_out_charges.funding_source_id
2. 0.000 21.523 ↓ 19.0 19 1

Sort (cost=31,441.28..31,441.28 rows=1 width=55) (actual time=21.522..21.523 rows=19 loops=1)

  • Sort Key: slr_taxes_reestr.period_date, slr_in_out_charges.funding_source_id
  • Sort Method: quicksort Memory: 27kB
3. 10.131 28.124 ↓ 19.0 19 1

Gather (cost=1,001.00..31,441.27 rows=1 width=55) (actual time=5.816..28.124 rows=19 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 0.000 17.993 ↓ 6.0 6 3 / 3

Nested Loop (cost=1.00..30,441.17 rows=1 width=55) (actual time=12.801..17.993 rows=6 loops=3)

5. 0.034 17.369 ↓ 2.1 219 3 / 3

Nested Loop (cost=0.43..9,554.15 rows=102 width=12) (actual time=12.107..17.369 rows=219 loops=3)

6. 17.232 17.232 ↓ 0.0 0 3 / 3

Parallel Seq Scan on slr_employee (cost=0.00..8,503.51 rows=2 width=8) (actual time=12.100..17.232 rows=0 loops=3)

  • Filter: (candidate_id = 9,543)
  • Rows Removed by Filter: 113,057
7. 0.103 0.103 ↓ 1.9 656 1 / 3

Index Scan using slr_in_out_charges_employee_id on slr_in_out_charges (cost=0.43..521.78 rows=354 width=12) (actual time=0.015..0.309 rows=656 loops=1)

  • Index Cond: (employee_id = slr_employee.id)
8. 0.656 0.656 ↓ 0.0 0 656 / 3

Index Scan using slr_taxes_reestr_charge_id on slr_taxes_reestr (cost=0.56..204.76 rows=1 width=51) (actual time=0.003..0.003 rows=0 loops=656)

  • Index Cond: (charge_id = slr_in_out_charges.id)
  • Filter: ((period_date >= '2020-01-01'::date) AND (period_date <= '2020-07-01'::date) AND (ent_id = 1,500) AND (tax_id = 6))
  • Rows Removed by Filter: 2