explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zZT : Calc

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=76.51..76.51 rows=2 width=1,390) (actual rows= loops=)

  • Output: authentication_department.id, authentication_department.title, authentication_department.parent_id, authentication_department.is_active, authentication_department.region_id, authentication_department.password, authentication_department.login, authentication_department.is_kasko_available, authentication_department.is_osago_available, authentication_department.is_kasko_osago_available, authentication_department.is_correction_factor_allowed, authentication_department.is_exact_price_allowed, authentication_department.status, authentication_department.lft, authentication_department.rght, authentication_department.tree_id, authentication_department.level, ((SubPlan 1))
  • Sort Key: authentication_department.id
2. 0.000 0.000 ↓ 0.0

Seq Scan on public.authentication_department (cost=0.00..76.50 rows=2 width=1,390) (actual rows= loops=)

  • Output: authentication_department.id, authentication_department.title, authentication_department.parent_id, authentication_department.is_active, authentication_department.region_id, authentication_department.password, authentication_department.login, authentication_department.is_kasko_available, authentication_department.is_osago_available, authentication_department.is_kasko_osago_available, authentication_department.is_correction_factor_allowed, authentication_department.is_exact_price_allowed, authentication_department.status, authentication_department.lft, authentication_department.rght, authentication_department.tree_id, authentication_department.level, (SubPlan 1)
  • Filter: (authentication_department.id = ANY ('{1,2}'::integer[]))
3.          

SubPlan (forSeq Scan)

4. 0.000 0.000 ↓ 0.0

Aggregate (cost=32.93..32.94 rows=1 width=8) (actual rows= loops=)

  • Output: count(*)
5. 0.000 0.000 ↓ 0.0

Unique (cost=32.90..32.91 rows=1 width=86) (actual rows= loops=)

  • Output: NULL::integer, main_car."VIN", u1.osago_calculation_type, u1.kasko_calculation_type
6. 0.000 0.000 ↓ 0.0

Sort (cost=32.90..32.91 rows=1 width=86) (actual rows= loops=)

  • Output: NULL::integer, main_car."VIN", u1.osago_calculation_type, u1.kasko_calculation_type
  • Sort Key: main_car."VIN", u1.osago_calculation_type, u1.kasko_calculation_type
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.72..32.89 rows=1 width=86) (actual rows= loops=)

  • Output: NULL::integer, main_car."VIN", u1.osago_calculation_type, u1.kasko_calculation_type
8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.58..32.70 rows=1 width=8) (actual rows= loops=)

  • Output: u1.osago_calculation_type, u1.kasko_calculation_type, main_insuredobject.car_id
9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..24.52 rows=1 width=8) (actual rows= loops=)

  • Output: u1.osago_calculation_type, u1.kasko_calculation_type, u1.insured_object_id
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.28..16.34 rows=1 width=12) (actual rows= loops=)

  • Output: u1.osago_calculation_type, u1.kasko_calculation_type, u1.id, u1.insured_object_id
11. 0.000 0.000 ↓ 0.0

Index Scan using authentication_calcuser_department_id_f9ec78ce on public.authentication_calcuser u2 (cost=0.14..8.16 rows=1 width=4) (actual rows= loops=)

  • Output: u2.id
  • Index Cond: (u2.department_id = authentication_department.id)
12. 0.000 0.000 ↓ 0.0

Index Scan using main_calculation_creator_id_74ce2a03 on public.main_calculation u1 (cost=0.14..8.17 rows=1 width=16) (actual rows= loops=)

  • Output: u1.osago_calculation_type, u1.kasko_calculation_type, u1.id, u1.creator_id, u1.insured_object_id
  • Index Cond: (u1.creator_id = u2.id)
  • Filter: ((u1.kasko_calculation_type = ANY ('{1,2}'::integer[])) AND (u1.osago_calculation_type = ANY ('{1,2}'::integer[])) AND (u1.created_at >= '2019-06-03 21:00:00+00'::timestamp with time zone) AND (u1.created_at <= '2019-12-20 21:00:00+00'::timestamp with time zone))
13. 0.000 0.000 ↓ 0.0

Index Scan using main_result_calculation_id_a14451ef on public.main_result u0 (cost=0.14..8.17 rows=1 width=4) (actual rows= loops=)

  • Output: u0.calculation_id
  • Index Cond: (u0.calculation_id = u1.id)
  • Filter: ((u0.created_at >= '2019-06-03 21:00:00+00'::timestamp with time zone) AND (u0.created_at <= '2019-12-20 21:00:00+00'::timestamp with time zone) AND ((u0.status)::text = 'OK'::text) AND ((u0.type_request)::text = 'final'::text))
14. 0.000 0.000 ↓ 0.0

Index Scan using main_insuredobject_pkey on public.main_insuredobject (cost=0.15..8.17 rows=1 width=8) (actual rows= loops=)

  • Output: main_insuredobject.id, main_insuredobject.car_id, main_insuredobject.creator_id, main_insuredobject.insurant_id
  • Index Cond: (u1.insured_object_id = main_insuredobject.id)
15. 0.000 0.000 ↓ 0.0

Index Scan using main_car_pkey on public.main_car (cost=0.14..0.19 rows=1 width=82) (actual rows= loops=)

  • Output: main_car."VIN", main_car.id
  • Index Cond: (main_insuredobject.car_id = main_car.id)