explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZHDZ : Optimization for: plan #NGP

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 700.225 ↓ 10.0 10 1

Limit (cost=27,335.14..27,335.15 rows=1 width=4,057) (actual time=700.198..700.225 rows=10 loops=1)

  • Output: pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, c_3.code, t_3.psp_name, root.epts_num, pv.first_active_status_date, root.epts_org_id, root.status_date, sh.status_id, c.code, t.name, sh.reason_id, c_1.code, t_1.name, pv.ts_cu_cat_id, c_4.code, t_4.name, pv.ts_cat_id, c_5.code, t_5.name, pv.ecologic_class_id, c_6.code, t_6.name, pv.ecologic_class_is_missing, pv.manufactory_year, (make_date(pv.manufactory_year, COALESCE(pv.manufactory_month, 1), 1)), pv.approval_tts_number, (string_agg((t_9.name)::text, ', '::text ORDER BY (t_9.name)::text)), pv.ts_trademark_id, t_7.name, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, (CASE WHEN pv.chassis_number_is_missing THEN m.name ELSE pv.chassis_number END), (CASE WHEN pv.body_number_is_missing THEN m.name ELSE pv.body_number END), pv.emergency_services_number, (CASE WHEN pv.engine_number_is_missing THEN (m.name)::text ELSE (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text)) END), pw.weight_value, pv.user_add, pv.org_add, pv.date_add, pv.country_add, t_8.name, t_8.short_name, c_8.code, (string_agg(concat_ws(' '::text, t_10.name, t_11.name), ', '::text ORDER BY t_10.name, t_11.name)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.id ELSE NULL::bigint END)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.code ELSE NULL::character varying END)::text)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN t_11.name ELSE NULL::character varying END)::text)), own.owner_id, (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_sum ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_value ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_coeff ELSE NULL::numeric END)), (COALESCE(pv.vin, pv.manuf_ts_code)), manufacturer_per.person_root_id, pv.assembly_plant_id, root.ver_guid, pv.approval_tts_type_id, engine_1.trademark, engine_1.model, engine_1.volume_cylinder, engine_1.maximum_power
  • Buffers: shared hit=87502
2.          

Initplan (for Limit)

3. 0.104 0.104 ↑ 1.0 1 1

Result (cost=0.00..0.26 rows=1 width=8) (actual time=0.104..0.104 rows=1 loops=1)

  • Output: nsi.c_passport_type_pts_id()
  • Buffers: shared hit=1
4. 0.125 700.199 ↓ 10.0 10 1

Sort (cost=27,334.88..27,334.89 rows=1 width=4,057) (actual time=700.197..700.199 rows=10 loops=1)

  • Output: pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, c_3.code, t_3.psp_name, root.epts_num, pv.first_active_status_date, root.epts_org_id, root.status_date, sh.status_id, c.code, t.name, sh.reason_id, c_1.code, t_1.name, pv.ts_cu_cat_id, c_4.code, t_4.name, pv.ts_cat_id, c_5.code, t_5.name, pv.ecologic_class_id, c_6.code, t_6.name, pv.ecologic_class_is_missing, pv.manufactory_year, (make_date(pv.manufactory_year, COALESCE(pv.manufactory_month, 1), 1)), pv.approval_tts_number, (string_agg((t_9.name)::text, ', '::text ORDER BY (t_9.name)::text)), pv.ts_trademark_id, t_7.name, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, (CASE WHEN pv.chassis_number_is_missing THEN m.name ELSE pv.chassis_number END), (CASE WHEN pv.body_number_is_missing THEN m.name ELSE pv.body_number END), pv.emergency_services_number, (CASE WHEN pv.engine_number_is_missing THEN (m.name)::text ELSE (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text)) END), pw.weight_value, pv.user_add, pv.org_add, pv.date_add, pv.country_add, t_8.name, t_8.short_name, c_8.code, (string_agg(concat_ws(' '::text, t_10.name, t_11.name), ', '::text ORDER BY t_10.name, t_11.name)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.id ELSE NULL::bigint END)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.code ELSE NULL::character varying END)::text)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN t_11.name ELSE NULL::character varying END)::text)), own.owner_id, (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_sum ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_value ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_coeff ELSE NULL::numeric END)), (COALESCE(pv.vin, pv.manuf_ts_code)), manufacturer_per.person_root_id, pv.assembly_plant_id, root.ver_guid, pv.approval_tts_type_id, engine_1.trademark, engine_1.model, engine_1.volume_cylinder, engine_1.maximum_power
  • Sort Key: pv.id
  • Sort Method: top-N heapsort Memory: 46kB
  • Buffers: shared hit=87502
5. 0.088 700.074 ↓ 40.0 40 1

Nested Loop Left Join (cost=51.13..27,334.87 rows=1 width=4,057) (actual time=38.101..700.074 rows=40 loops=1)

  • Output: pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, c_3.code, t_3.psp_name, root.epts_num, pv.first_active_status_date, root.epts_org_id, root.status_date, sh.status_id, c.code, t.name, sh.reason_id, c_1.code, t_1.name, pv.ts_cu_cat_id, c_4.code, t_4.name, pv.ts_cat_id, c_5.code, t_5.name, pv.ecologic_class_id, c_6.code, t_6.name, pv.ecologic_class_is_missing, pv.manufactory_year, make_date(pv.manufactory_year, COALESCE(pv.manufactory_month, 1), 1), pv.approval_tts_number, (string_agg((t_9.name)::text, ', '::text ORDER BY (t_9.name)::text)), pv.ts_trademark_id, t_7.name, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, CASE WHEN pv.chassis_number_is_missing THEN m.name ELSE pv.chassis_number END, CASE WHEN pv.body_number_is_missing THEN m.name ELSE pv.body_number END, pv.emergency_services_number, CASE WHEN pv.engine_number_is_missing THEN (m.name)::text ELSE (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text)) END, pw.weight_value, pv.user_add, pv.org_add, pv.date_add, pv.country_add, t_8.name, t_8.short_name, c_8.code, (string_agg(concat_ws(' '::text, t_10.name, t_11.name), ', '::text ORDER BY t_10.name, t_11.name)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.id ELSE NULL::bigint END)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.code ELSE NULL::character varying END)::text)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN t_11.name ELSE NULL::character varying END)::text)), own.owner_id, (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_sum ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_value ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_coeff ELSE NULL::numeric END)), COALESCE(pv.vin, pv.manuf_ts_code), manufacturer_per.person_root_id, pv.assembly_plant_id, root.ver_guid, pv.approval_tts_type_id, engine_1.trademark, engine_1.model, engine_1.volume_cylinder, engine_1.maximum_power
  • Buffers: shared hit=87502
6. 5.719 699.626 ↓ 40.0 40 1

Nested Loop Left Join (cost=42.83..27,326.54 rows=1 width=4,024) (actual time=38.073..699.626 rows=40 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name, c_6.code, t_6.name, c_8.code, t_8.name, t_8.short_name, pw.weight_value, (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text)), (string_agg((t_9.name)::text, ', '::text ORDER BY (t_9.name)::text)), (string_agg(concat_ws(' '::text, t_10.name, t_11.name), ', '::text ORDER BY t_10.name, t_11.name)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.id ELSE NULL::bigint END)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.code ELSE NULL::character varying END)::text)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN t_11.name ELSE NULL::character varying END)::text)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_sum ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_value ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_coeff ELSE NULL::numeric END)), own.owner_id, manufacturer_per.person_root_id
  • Inner Unique: true
  • Join Filter: (manufacturer_per.id = pv.manufacturer_id)
  • Rows Removed by Join Filter: 106259
  • Buffers: shared hit=87382
7. 0.053 686.947 ↓ 40.0 40 1

Nested Loop Left Join (cost=42.83..27,129.28 rows=1 width=4,024) (actual time=37.584..686.947 rows=40 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name, c_6.code, t_6.name, c_8.code, t_8.name, t_8.short_name, pw.weight_value, (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text)), (string_agg((t_9.name)::text, ', '::text ORDER BY (t_9.name)::text)), (string_agg(concat_ws(' '::text, t_10.name, t_11.name), ', '::text ORDER BY t_10.name, t_11.name)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.id ELSE NULL::bigint END)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.code ELSE NULL::character varying END)::text)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN t_11.name ELSE NULL::character varying END)::text)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_sum ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_value ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_coeff ELSE NULL::numeric END)), own.owner_id
  • Buffers: shared hit=86475
8. 0.086 686.654 ↓ 40.0 40 1

Nested Loop Left Join (cost=42.55..27,120.96 rows=1 width=4,016) (actual time=37.575..686.654 rows=40 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name, c_6.code, t_6.name, c_8.code, t_8.name, t_8.short_name, pw.weight_value, (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text)), (string_agg((t_9.name)::text, ', '::text ORDER BY (t_9.name)::text)), (string_agg(concat_ws(' '::text, t_10.name, t_11.name), ', '::text ORDER BY t_10.name, t_11.name)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.id ELSE NULL::bigint END)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.code ELSE NULL::character varying END)::text)), (max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN t_11.name ELSE NULL::character varying END)::text)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_sum ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_value ELSE NULL::numeric END)), (max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_coeff ELSE NULL::numeric END))
  • Buffers: shared hit=86356
9. 0.045 682.968 ↓ 40.0 40 1

Nested Loop Left Join (cost=24.49..27,102.88 rows=1 width=3,824) (actual time=37.379..682.968 rows=40 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name, c_6.code, t_6.name, c_8.code, t_8.name, t_8.short_name, pw.weight_value, (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text)), (string_agg((t_9.name)::text, ', '::text ORDER BY (t_9.name)::text)), (secr.get_current_user_country_id())
  • Buffers: shared hit=85743
10. 0.050 681.843 ↓ 40.0 40 1

Nested Loop Left Join (cost=24.49..27,102.85 rows=1 width=3,816) (actual time=37.227..681.843 rows=40 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name, c_6.code, t_6.name, c_8.code, t_8.name, t_8.short_name, pw.weight_value, (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text)), (string_agg((t_9.name)::text, ', '::text ORDER BY (t_9.name)::text))
  • Buffers: shared hit=85703
11. 0.056 680.233 ↓ 40.0 40 1

Nested Loop Left Join (cost=13.20..27,091.53 rows=1 width=3,784) (actual time=37.138..680.233 rows=40 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name, c_6.code, t_6.name, c_8.code, t_8.name, t_8.short_name, pw.weight_value, (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text))
  • Buffers: shared hit=85503
12. 2.761 679.457 ↓ 40.0 40 1

Nested Loop Left Join (cost=12.64..27,090.34 rows=1 width=3,720) (actual time=37.096..679.457 rows=40 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name, c_6.code, t_6.name, pw.weight_value, (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text))
  • Inner Unique: true
  • Filter: (upper(CASE WHEN pv.engine_number_is_missing THEN (m.name)::text ELSE (string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text)) END) ~~ '%22%'::text)
  • Rows Removed by Filter: 1888
  • Buffers: shared hit=85223
13. 0.545 649.704 ↓ 128.5 1,928 1

Nested Loop Left Join (cost=4.19..26,963.03 rows=15 width=3,688) (actual time=2.189..649.704 rows=1,928 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name, c_6.code, t_6.name, pw.weight_value
  • Buffers: shared hit=76327
14. 2.139 120.887 ↓ 128.5 1,928 1

Nested Loop Left Join (cost=2.41..26,885.73 rows=15 width=3,683) (actual time=1.883..120.887 rows=1,928 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name, c_6.code, t_6.name
  • Inner Unique: true
  • Join Filter: (c_6.id = t_6.ecolog_class_id)
  • Rows Removed by Join Filter: 10393
  • Buffers: shared hit=40909
15. 1.993 118.748 ↓ 128.5 1,928 1

Nested Loop Left Join (cost=2.41..26,883.98 rows=15 width=3,175) (actual time=1.841..118.748 rows=1,928 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name, c_6.code, c_6.id
  • Inner Unique: true
  • Join Filter: (pv.ecologic_class_id = c_6.id)
  • Rows Removed by Join Filter: 10393
  • Buffers: shared hit=40908
16. 0.467 116.755 ↓ 128.5 1,928 1

Nested Loop Left Join (cost=2.41..26,881.31 rows=15 width=3,029) (actual time=1.832..116.755 rows=1,928 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name, c_5.code, t_5.name
  • Buffers: shared hit=40907
17. 1.277 75.800 ↓ 128.5 1,928 1

Nested Loop Left Join (cost=2.27..26,853.05 rows=15 width=2,375) (actual time=1.804..75.800 rows=1,928 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name, t_7.name
  • Buffers: shared hit=35147
18. 5.257 61.027 ↓ 128.5 1,928 1

Nested Loop Left Join (cost=1.71..26,839.41 rows=15 width=2,367) (actual time=1.769..61.027 rows=1,928 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, t_4.name
  • Inner Unique: true
  • Join Filter: (c_4.id = t_4.ts_cat_id)
  • Rows Removed by Join Filter: 71259
  • Buffers: shared hit=26615
19. 1.188 51.914 ↓ 128.5 1,928 1

Nested Loop Left Join (cost=1.71..26,822.59 rows=15 width=2,372) (actual time=0.978..51.914 rows=1,928 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name, c_4.code, c_4.id
  • Inner Unique: true
  • Join Filter: (pv.ts_cu_cat_id = c_4.id)
  • Rows Removed by Join Filter: 21131
  • Buffers: shared hit=26613
20. 1.040 48.798 ↓ 128.5 1,928 1

Nested Loop Left Join (cost=1.71..26,809.95 rows=15 width=2,226) (actual time=0.966..48.798 rows=1,928 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid, m.name
  • Buffers: shared hit=26612
21. 1.623 47.758 ↓ 128.5 1,928 1

Nested Loop Left Join (cost=1.56..26,801.58 rows=15 width=2,155) (actual time=0.912..47.758 rows=1,928 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, c_3.code, t_3.psp_name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid
  • Join Filter: (pv.type_id = c_3.id)
  • Rows Removed by Join Filter: 3856
  • Buffers: shared hit=26609
22. 0.359 46.135 ↓ 128.5 1,928 1

Nested Loop (cost=1.56..26,798.54 rows=15 width=1,501) (actual time=0.875..46.135 rows=1,928 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name, root.epts_num, root.epts_org_id, root.status_date, root.ver_guid
  • Inner Unique: true
  • Buffers: shared hit=26607
23. 5.960 35.256 ↓ 87.7 2,630 1

Nested Loop Left Join (cost=1.13..26,558.38 rows=30 width=1,432) (actual time=0.757..35.256 rows=2,630 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name, t_1.name
  • Inner Unique: true
  • Join Filter: (c_1.id = t_1.reason_id)
  • Rows Removed by Join Filter: 65511
  • Buffers: shared hit=16074
24. 1.735 26.666 ↓ 87.7 2,630 1

Nested Loop Left Join (cost=1.13..26,541.49 rows=30 width=1,255) (actual time=0.152..26.666 rows=2,630 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, c_1.id, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, t.name
  • Inner Unique: true
  • Join Filter: (c.id = t.status_id)
  • Rows Removed by Join Filter: 5187
  • Buffers: shared hit=16070
25. 1.738 24.931 ↓ 87.7 2,630 1

Nested Loop (cost=1.13..26,535.43 rows=30 width=1,238) (actual time=0.055..24.931 rows=2,630 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, c_1.id, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, c.code, c.id
  • Inner Unique: true
  • Join Filter: (sh.status_id = c.id)
  • Rows Removed by Join Filter: 5187
  • Buffers: shared hit=16069
26. 0.025 23.193 ↓ 87.7 2,630 1

Nested Loop Left Join (cost=1.13..26,530.18 rows=30 width=1,092) (actual time=0.046..23.193 rows=2,630 loops=1)

  • Output: sh.status_id, sh.reason_id, c_1.code, c_1.id, pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id
  • Buffers: shared hit=16068
27. 4.040 20.538 ↓ 87.7 2,630 1

Nested Loop (cost=0.86..26,461.81 rows=30 width=946) (actual time=0.040..20.538 rows=2,630 loops=1)

  • Output: pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.first_active_status_date, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.approval_tts_number, pv.ts_trademark_id, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_num, pv.chassis_number_is_missing, pv.chassis_number, pv.body_number_is_missing, pv.body_number, pv.emergency_services_number, pv.engine_number_is_missing, pv.user_add, pv.org_add, pv.date_add, pv.country_add, pv.vin, pv.manuf_ts_code, pv.assembly_plant_id, pv.approval_tts_type_id, pv.manufacturer_id, sh.status_id, sh.reason_id
  • Buffers: shared hit=15998
28. 1.333 1.333 ↑ 1.0 3,033 1

Index Scan using test_type_i on pts.fdc_pts_ver pv (cost=0.43..1,921.25 rows=3,050 width=930) (actual time=0.024..1.333 rows=3,033 loops=1)

  • Output: pv.id, pv.root_id, pv.date_from, pv.date_to, pv.type_id, pv.status_date, pv.status_id, pv.first_active_status_date, pv.issue_date, pv.reason_reg_id, pv.extra_reg_reason_doc_name, pv.extra_reg_reason_doc_date, pv.extra_reg_reason_doc_number, pv.extra_reg_reason_doc_org_issued, pv.extra_reg_reason_id, pv.ts_cu_cat_id, pv.ts_cat_id, pv.ecologic_class_id, pv.ecologic_class_is_missing, pv.manufactory_year, pv.manufactory_month, pv.manufacture_place_id, pv.country_export_id, pv.manufactory_country_id, pv.manufacturer_representative_id, pv.manufacturer_id, pv.manufacturer_is_missing, pv.manufacturer_annotation, pv.is_pref_manuf_mode, pv.pref_manuf_mode, pv.pref_manuf_mode_id, pv.approval_tts_number, pv.is_multi_color, pv.color_shade, pv.ts_trademark_id, pv.ts_trademark_is_missing, pv.model_name, pv.commercial_name, pv.design_name, pv.modif_name, pv.manuf_ts_type_code, pv.base_ts_pts_id, pv.base_ts_pts_num, pv.base_ts_pts_date, pv.base_ts_trademark_id, pv.base_ts_model_name, pv.manuf_ts_code, pv.comment, pv.vin, pv.chassis_number, pv.chassis_number_is_missing, pv.body_number, pv.body_number_is_missing, pv.gearbox_number, pv.gearbox_number_is_missing, pv.drive_axle_number, pv.drive_axle_number_is_missing, pv.emergency_services_number, pv.emergency_services_number_is_missing, pv.navigator_number, pv.navigator_number_is_missing, pv.tachograph_number, pv.tachograph_number_is_missing, pv.marking_is_missing, pv.engine_number_is_missing, pv.otts_ver_id, pv.user_add, pv.org_add, pv.server_add, pv.date_add, pv.country_add, pv.restriction, pv.is_reg_action_eurasian_economic_union, pv.base_ts_type, pv.request_id, pv.otts_modification_id, pv.otts_model_id, pv.otts_commercial_name_id, pv.otts_ecologic_class_id, pv.otts_ts_cu_cat_id, pv.signature_id, pv.parent_version_id, pv.author_role_bitmask, pv.approval_tts_date_from, pv.approval_tts_date_to, pv.approval_tts_author, pv.approval_tts_is_missing, pv.extra_reg_reason_doc_id, pv.extra_reg_reason_doc_pages, pv.vin_is_missing, pv.reg_rule_category_id, pv.manufacturer_representative_is_missing, pv.commercial_name_is_missing, pv.modification_is_missing, pv.ts_design_name_id, pv.ts_design_name_other_id, pv.assembly_plant_id, pv.ts_cu_cat_class_id, pv.assembly_plant_is_missing, pv.is_special_vehicles, pv.ts_cu_cat_class_is_missing, pv.model_is_missing, pv.approval_tts_type_id, pv.is_different_tires, pv.base_ts_commercial_name, pv.base_ts_vin, pv.base_ts_is_missing, pv.approval_tts_reestr_doc_date, pv.is_check_by_otts_missing, pv.manufacturer_class, pv.virtual_modif_name
  • Index Cond: (pv.type_id = ANY ('{1,2}'::bigint[]))
  • Buffers: shared hit=350
29. 15.165 15.165 ↑ 1.0 1 3,033

Index Scan using fdc_pts_status_history_psp_i on pts.fdc_pts_status_history sh (cost=0.43..8.04 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=3,033)

  • Output: sh.id, sh.date_from, sh.date_to, sh.pasport_id, sh.status_id, sh.user_add, sh.org_add, sh.server_add, sh.date_add, sh.request_id, sh.reason_id, sh.reason_value
  • Index Cond: (sh.pasport_id = pv.id)
  • Filter: ((statement_timestamp() >= sh.date_from) AND (statement_timestamp() <= sh.date_to) AND (sh.status_id = ANY ('{1,2,3,4,5}'::bigint[])))
  • Rows Removed by Filter: 2
  • Buffers: shared hit=15648
30. 2.392 2.630 ↓ 0.0 0 2,630

Nested Loop Left Join (cost=0.27..2.27 rows=1 width=146) (actual time=0.001..0.001 rows=0 loops=2,630)

  • Output: c_1.code, c_1.id
  • Inner Unique: true
  • Join Filter: (c_2.id = t_2.object_type_id)
  • Rows Removed by Join Filter: 0
  • Buffers: shared hit=70
31. 0.000 0.000 ↓ 0.0 0 2,630

Nested Loop (cost=0.27..1.03 rows=1 width=154) (actual time=0.000..0.000 rows=0 loops=2,630)

  • Output: c_1.code, c_1.id, c_2.id
  • Inner Unique: true
  • Buffers: shared hit=56
32. 0.000 0.000 ↓ 0.0 0 2,630

Index Scan using fdc_change_status_reason_pk on nsi.fdc_change_status_reason c_1 (cost=0.14..0.16 rows=1 width=154) (actual time=0.000..0.000 rows=0 loops=2,630)

  • Output: c_1.id, c_1.code, c_1.object_type_id, c_1.date_from, c_1.date_to, c_1.history_id
  • Index Cond: (c_1.id = sh.reason_id)
  • Buffers: shared hit=28
33. 0.028 0.028 ↑ 1.0 1 14

Index Only Scan using fdc_object_type_pk on nsi.fdc_object_type c_2 (cost=0.13..0.63 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=14)

  • Output: c_2.id
  • Index Cond: (c_2.id = c_1.object_type_id)
  • Heap Fetches: 14
  • Buffers: shared hit=28
34. 0.238 0.238 ↓ 3.0 3 14

Seq Scan on nsi.fdc_object_type_translation t_2 (cost=0.00..1.23 rows=1 width=8) (actual time=0.008..0.017 rows=3 loops=14)

  • Output: t_2.id, t_2.object_type_id, t_2.language_id, t_2.name, t_2.description
  • Filter: (t_2.language_id = lang.get_current_lang_id())
  • Buffers: shared hit=14
35. 0.000 0.000 ↑ 3.3 3 2,630

Materialize (cost=0.00..1.15 rows=10 width=146) (actual time=0.000..0.000 rows=3 loops=2,630)

  • Output: c.code, c.id
  • Buffers: shared hit=1
36. 0.007 0.007 ↑ 1.4 7 1

Seq Scan on nsi.fdc_status_pts c (cost=0.00..1.10 rows=10 width=146) (actual time=0.005..0.007 rows=7 loops=1)

  • Output: c.code, c.id
  • Buffers: shared hit=1
37. 0.000 0.000 ↑ 3.3 3 2,630

Materialize (cost=0.00..1.95 rows=10 width=33) (actual time=0.000..0.000 rows=3 loops=2,630)

  • Output: t.name, t.status_id
  • Buffers: shared hit=1
38. 0.113 0.113 ↑ 1.4 7 1

Seq Scan on nsi.fdc_status_pts_translation t (cost=0.00..1.90 rows=10 width=33) (actual time=0.084..0.113 rows=7 loops=1)

  • Output: t.name, t.status_id
  • Filter: (t.language_id = lang.get_current_lang_id())
  • Rows Removed by Filter: 10
  • Buffers: shared hit=1
39. 2.037 2.630 ↑ 1.0 25 2,630

Materialize (cost=0.00..6.04 rows=25 width=193) (actual time=0.000..0.001 rows=25 loops=2,630)

  • Output: t_1.name, t_1.reason_id
  • Buffers: shared hit=4
40. 0.593 0.593 ↑ 1.0 25 1

Seq Scan on nsi.fdc_change_status_reason_translation t_1 (cost=0.00..5.92 rows=25 width=193) (actual time=0.014..0.593 rows=25 loops=1)

  • Output: t_1.name, t_1.reason_id
  • Filter: (t_1.language_id = lang.get_current_lang_id())
  • Rows Removed by Filter: 103
  • Buffers: shared hit=4
41. 10.520 10.520 ↑ 1.0 1 2,630

Index Scan using fdc_pts_root_pk on pts.fdc_pts_root root (cost=0.43..8.01 rows=1 width=77) (actual time=0.004..0.004 rows=1 loops=2,630)

  • Output: root.id, root.user_add, root.org_add, root.server_add, root.date_add, root.passport_type_id, root.date_edit, root.is_created_by_template, root.ver_guid, root.epts_num, root.epts_org_id, root.visa, root.template_name, root.status_date, root.is_application_awaiting
  • Index Cond: (root.id = pv.root_id)
  • Filter: (root.passport_type_id = $0)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=10533
42. 0.000 0.000 ↑ 1.0 3 1,928

Materialize (cost=0.00..2.38 rows=3 width=662) (actual time=0.000..0.000 rows=3 loops=1,928)

  • Output: c_3.code, c_3.id, t_3.psp_name
  • Buffers: shared hit=2
43. 0.000 0.049 ↑ 1.0 3 1

Nested Loop Left Join (cost=0.00..2.36 rows=3 width=662) (actual time=0.034..0.049 rows=3 loops=1)

  • Output: c_3.code, c_3.id, t_3.psp_name
  • Buffers: shared hit=2
44. 0.004 0.046 ↑ 1.0 3 1

Nested Loop Left Join (cost=0.00..2.30 rows=3 width=662) (actual time=0.032..0.046 rows=3 loops=1)

  • Output: c_3.code, c_3.id, t_3.psp_name
  • Inner Unique: true
  • Join Filter: (c_3.id = t_3.kind_id)
  • Rows Removed by Join Filter: 3
  • Buffers: shared hit=2
45. 0.006 0.006 ↑ 1.0 3 1

Seq Scan on nsi.fdc_ts_kind c_3 (cost=0.00..1.03 rows=3 width=146) (actual time=0.005..0.006 rows=3 loops=1)

  • Output: c_3.id, c_3.code, c_3.date_from, c_3.date_to, c_3.history_id, c_3.is_ts, c_3.user_add, c_3.org_add, c_3.server_add, c_3.date_add
  • Buffers: shared hit=1
46. 0.002 0.036 ↓ 2.0 2 3

Materialize (cost=0.00..1.23 rows=1 width=524) (actual time=0.009..0.012 rows=2 loops=3)

  • Output: t_3.psp_name, t_3.kind_id
  • Buffers: shared hit=1
47. 0.034 0.034 ↓ 3.0 3 1

Seq Scan on nsi.fdc_ts_kind_translation t_3 (cost=0.00..1.23 rows=1 width=524) (actual time=0.024..0.034 rows=3 loops=1)

  • Output: t_3.psp_name, t_3.kind_id
  • Filter: (t_3.language_id = lang.get_current_lang_id())
  • Buffers: shared hit=1
48. 0.002 0.003 ↑ 1.0 1 3

Materialize (cost=0.00..0.03 rows=1 width=0) (actual time=0.000..0.001 rows=1 loops=3)

49. 0.001 0.001 ↑ 1.0 1 1

Subquery Scan on fdc_translate_messages_boolean_v (cost=0.00..0.02 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)

50. 0.000 0.000 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=64) (actual time=0.000..0.000 rows=1 loops=1)

  • Output: NULL::text, NULL::text
51. 0.000 0.000 ↑ 1.0 1 1,928

Materialize (cost=0.15..8.18 rows=1 width=71) (actual time=0.000..0.000 rows=1 loops=1,928)

  • Output: m.name
  • Buffers: shared hit=3
52. 0.054 0.054 ↑ 1.0 1 1

Index Scan using fdc_translate_messages_code_date_uk on lang.fdc_translate_messages m (cost=0.15..8.18 rows=1 width=71) (actual time=0.053..0.054 rows=1 loops=1)

  • Output: m.name
  • Index Cond: (((m.code)::text = 'SYS.IS_MISSING'::text) AND (m.languages_id = lang.get_current_lang_id()))
  • Filter: ((statement_timestamp() >= m.date_from) AND (statement_timestamp() <= m.date_to))
  • Buffers: shared hit=3
53. 1.918 1.928 ↑ 4.1 12 1,928

Materialize (cost=0.00..1.73 rows=49 width=146) (actual time=0.000..0.001 rows=12 loops=1,928)

  • Output: c_4.code, c_4.id
  • Buffers: shared hit=1
54. 0.010 0.010 ↑ 2.1 23 1

Seq Scan on nsi.fdc_ts_cu_cat c_4 (cost=0.00..1.49 rows=49 width=146) (actual time=0.006..0.010 rows=23 loops=1)

  • Output: c_4.code, c_4.id
  • Buffers: shared hit=1
55. 2.736 3.856 ↑ 1.3 38 1,928

Materialize (cost=0.00..5.92 rows=49 width=11) (actual time=0.000..0.002 rows=38 loops=1,928)

  • Output: t_4.name, t_4.ts_cat_id
  • Buffers: shared hit=2
56. 1.120 1.120 ↑ 1.0 49 1

Seq Scan on nsi.fdc_ts_cu_cat_translation t_4 (cost=0.00..5.67 rows=49 width=11) (actual time=0.024..1.120 rows=49 loops=1)

  • Output: t_4.name, t_4.ts_cat_id
  • Filter: (t_4.language_id = lang.get_current_lang_id())
  • Rows Removed by Filter: 192
  • Buffers: shared hit=2
57. 0.000 13.496 ↑ 1.0 1 1,928

Nested Loop Left Join (cost=0.56..0.90 rows=1 width=16) (actual time=0.007..0.007 rows=1 loops=1,928)

  • Output: c_7.id, t_7.name
  • Buffers: shared hit=8532
58. 10.146 13.496 ↑ 1.0 1 1,928

Nested Loop Left Join (cost=0.56..0.87 rows=1 width=16) (actual time=0.007..0.007 rows=1 loops=1,928)

  • Output: c_7.id, t_7.name
  • Inner Unique: true
  • Buffers: shared hit=8532
59. 1.928 1.928 ↑ 1.0 1 1,928

Index Only Scan using fdc_ts_trademark_pk on nsi.fdc_ts_trademark c_7 (cost=0.28..0.32 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1,928)

  • Output: c_7.id
  • Index Cond: (c_7.id = pv.ts_trademark_id)
  • Heap Fetches: 1422
  • Buffers: shared hit=4266
60. 1.422 1.422 ↑ 1.0 1 1,422

Index Scan using fdc_ts_trademark_translation_vl_i on nsi.fdc_ts_trademark_translation t_7 (cost=0.29..0.55 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=1,422)

  • Output: t_7.id, t_7.trademark_id, t_7.language_id, t_7.name
  • Index Cond: ((c_7.id = t_7.trademark_id) AND (t_7.language_id = lang.get_current_lang_id()))
  • Buffers: shared hit=4266
61. 0.000 0.000 ↑ 1.0 1 1,422

Result (cost=0.00..0.01 rows=1 width=64) (actual time=0.000..0.000 rows=1 loops=1,422)

  • Output: NULL::text, NULL::text
62. 1.928 40.488 ↑ 1.0 1 1,928

Nested Loop Left Join (cost=0.14..1.87 rows=1 width=662) (actual time=0.020..0.021 rows=1 loops=1,928)

  • Output: c_5.code, c_5.id, t_5.name
  • Buffers: shared hit=5760
63. 2.072 38.560 ↑ 1.0 1 1,928

Nested Loop Left Join (cost=0.14..1.84 rows=1 width=662) (actual time=0.020..0.020 rows=1 loops=1,928)

  • Output: c_5.code, c_5.id, t_5.name
  • Inner Unique: true
  • Join Filter: (c_5.id = t_5.ts_cat_id)
  • Rows Removed by Join Filter: 3
  • Buffers: shared hit=5760
64. 1.928 1.928 ↑ 1.0 1 1,928

Index Scan using fdc_ts_cat_pk on nsi.fdc_ts_cat c_5 (cost=0.14..0.16 rows=1 width=146) (actual time=0.001..0.001 rows=1 loops=1,928)

  • Output: c_5.id, c_5.code, c_5.date_from, c_5.date_to, c_5.history_id, c_5.is_ts, c_5.user_add, c_5.org_add, c_5.server_add, c_5.date_add
  • Index Cond: (pv.ts_cat_id = c_5.id)
  • Buffers: shared hit=3840
65. 34.560 34.560 ↓ 4.0 4 1,920

Seq Scan on nsi.fdc_ts_cat_translation t_5 (cost=0.00..1.67 rows=1 width=524) (actual time=0.006..0.018 rows=4 loops=1,920)

  • Output: t_5.id, t_5.ts_cat_id, t_5.language_id, t_5.short_name, t_5.name
  • Filter: (t_5.language_id = lang.get_current_lang_id())
  • Buffers: shared hit=1920
66. 0.000 0.000 ↑ 1.0 1 1,920

Result (cost=0.00..0.01 rows=1 width=64) (actual time=0.000..0.000 rows=1 loops=1,920)

  • Output: NULL::text, NULL::text
67. 0.000 0.000 ↑ 1.2 6 1,928

Materialize (cost=0.00..1.10 rows=7 width=146) (actual time=0.000..0.000 rows=6 loops=1,928)

  • Output: c_6.code, c_6.id
  • Buffers: shared hit=1
68. 0.005 0.005 ↑ 1.0 7 1

Seq Scan on nsi.fdc_ecolog_class c_6 (cost=0.00..1.07 rows=7 width=146) (actual time=0.003..0.005 rows=7 loops=1)

  • Output: c_6.code, c_6.id
  • Buffers: shared hit=1
69. 0.000 0.000 ↓ 6.0 6 1,928

Materialize (cost=0.00..1.53 rows=1 width=524) (actual time=0.000..0.000 rows=6 loops=1,928)

  • Output: t_6.name, t_6.ecolog_class_id
  • Buffers: shared hit=1
70. 0.175 0.175 ↓ 7.0 7 1

Seq Scan on nsi.fdc_ecolog_class_translation t_6 (cost=0.00..1.52 rows=1 width=524) (actual time=0.016..0.175 rows=7 loops=1)

  • Output: t_6.name, t_6.ecolog_class_id
  • Filter: (t_6.language_id = lang.get_current_lang_id())
  • Rows Removed by Filter: 28
  • Buffers: shared hit=1
71. 11.568 528.272 ↑ 1.0 1 1,928

Nested Loop Left Join (cost=1.78..5.14 rows=1 width=151) (actual time=0.234..0.274 rows=1 loops=1,928)

  • Output: pw.weight_value, pw.pasport_id, wt.code
  • Inner Unique: true
  • Buffers: shared hit=35418
72. 3.856 514.776 ↑ 1.0 1 1,928

Nested Loop Left Join (cost=1.51..4.40 rows=1 width=159) (actual time=0.227..0.267 rows=1 loops=1,928)

  • Output: pw.weight_value, pw.pasport_id, wt.code, measure_unit.id
  • Inner Unique: true
  • Buffers: shared hit=29634
73. 7.712 508.992 ↑ 1.0 1 1,928

Hash Right Join (cost=1.37..4.24 rows=1 width=159) (actual time=0.224..0.264 rows=1 loops=1,928)

  • Output: pw.weight_value, pw.measure_unit_id, pw.pasport_id, wt.code
  • Hash Cond: (wt_tr.weight_type_id = wt.id)
  • Buffers: shared hit=25778
74. 485.856 485.856 ↑ 1.0 11 1,928

Seq Scan on nsi.fdc_weight_type_translation wt_tr (cost=0.00..2.83 rows=11 width=8) (actual time=0.064..0.252 rows=11 loops=1,928)

  • Output: wt_tr.id, wt_tr.weight_type_id, wt_tr.language_id, wt_tr.name
  • Filter: (wt_tr.language_id = lang.get_current_lang_id())
  • Rows Removed by Filter: 44
  • Buffers: shared hit=3856
75. 0.000 15.424 ↑ 1.0 1 1,928

Hash (cost=1.35..1.35 rows=1 width=167) (actual time=0.008..0.008 rows=1 loops=1,928)

  • Output: pw.weight_value, pw.measure_unit_id, pw.pasport_id, wt.id, wt.code
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=21922
76. 1.662 15.424 ↑ 1.0 1 1,928

Nested Loop (cost=0.42..1.35 rows=1 width=167) (actual time=0.005..0.008 rows=1 loops=1,928)

  • Output: pw.weight_value, pw.measure_unit_id, pw.pasport_id, wt.id, wt.code
  • Inner Unique: true
  • Join Filter: (((pv.type_id = ANY ('{1,2}'::bigint[])) AND ((wt.code)::text = '12'::text)) OR ((pv.type_id = '3'::bigint) AND ((wt.code)::text = '27'::text)))
  • Buffers: shared hit=21922
77. 5.784 5.784 ↑ 1.0 4 1,928

Index Scan using fdc_pts_weight_psp_i on pts.fdc_pts_weight pw (cost=0.29..0.64 rows=4 width=29) (actual time=0.002..0.003 rows=4 loops=1,928)

  • Output: pw.id, pw.pasport_id, pw.weight_type_id, pw.weight_value, pw.measure_unit_id, pw.user_add, pw.org_add, pw.server_add, pw.date_add, pw.axle_number, pw.pts_weight_type_id
  • Index Cond: (pv.id = pw.pasport_id)
  • Buffers: shared hit=5966
78. 7.978 7.978 ↓ 0.0 0 7,978

Index Scan using fdc_weight_type_pk on nsi.fdc_weight_type wt (cost=0.14..0.16 rows=1 width=146) (actual time=0.001..0.001 rows=0 loops=7,978)

  • Output: wt.id, wt.code, wt.date_from, wt.date_to, wt.history_id, wt.user_add, wt.org_add, wt.server_add, wt.date_add, wt.order_number
  • Index Cond: (wt.id = pw.weight_type_id)
  • Filter: (((wt.code)::text = '12'::text) OR ((wt.code)::text = '27'::text))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=15956
79. 1.928 1.928 ↑ 1.0 1 1,928

Index Only Scan using fdc_measure_unit_pk on nsi.fdc_measure_unit measure_unit (cost=0.14..0.16 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1,928)

  • Output: measure_unit.id
  • Index Cond: (measure_unit.id = pw.measure_unit_id)
  • Heap Fetches: 1928
  • Buffers: shared hit=3856
80. 1.928 1.928 ↑ 1.0 1 1,928

Index Only Scan using fdc_measure_unit_translation_vl_i on nsi.fdc_measure_unit_translation measure_unit_tr (cost=0.28..0.73 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1,928)

  • Output: measure_unit_tr.measure_unit_id, measure_unit_tr.language_id
  • Index Cond: ((measure_unit_tr.measure_unit_id = measure_unit.id) AND (measure_unit_tr.language_id = lang.get_current_lang_id()))
  • Heap Fetches: 1928
  • Buffers: shared hit=5784
81. 5.784 26.992 ↑ 1.0 1 1,928

Aggregate (cost=8.45..8.46 rows=1 width=32) (actual time=0.014..0.014 rows=1 loops=1,928)

  • Output: string_agg((engine.part_number)::text, ', '::text ORDER BY (engine.part_number)::text)
  • Buffers: shared hit=8896
82. 21.208 21.208 ↑ 1.0 1 1,928

Index Scan using fdc_pts_part_number_psp_i on pts.fdc_pts_part_number engine (cost=0.42..8.45 rows=1 width=10) (actual time=0.011..0.011 rows=1 loops=1,928)

  • Output: engine.id, engine.date_from, engine.date_to, engine.pasport_id, engine.equipment_type_id, engine.part_number, engine.model, engine.description, engine.decode_info, engine.is_missing, engine.user_add, engine.org_add, engine.server_add, engine.date_add
  • Index Cond: (engine.pasport_id = pv.id)
  • Filter: (engine.equipment_type_id = nsi.get_equipment_type_id('ENGINE_NUMBER'::character varying))
  • Buffers: shared hit=8896
83. 0.080 0.720 ↑ 1.0 1 40

Nested Loop (cost=0.56..1.18 rows=1 width=72) (actual time=0.017..0.018 rows=1 loops=40)

  • Output: c_8.code, c_8.id, t_8.name, t_8.short_name
  • Buffers: shared hit=280
84. 0.320 0.560 ↑ 1.0 1 40

Nested Loop Left Join (cost=0.43..0.96 rows=1 width=72) (actual time=0.013..0.014 rows=1 loops=40)

  • Output: c_8.code, c_8.id, t_8.name, t_8.short_name
  • Inner Unique: true
  • Buffers: shared hit=200
85. 0.120 0.120 ↑ 1.0 1 40

Index Scan using fdc_country_pk on nsi.fdc_country c_8 (cost=0.14..0.17 rows=1 width=12) (actual time=0.002..0.003 rows=1 loops=40)

  • Output: c_8.id, c_8.code, c_8.name_eng, c_8.name_padeg, c_8.code_alfa2, c_8.code_alfa3, c_8.date_from, c_8.date_to, c_8.history_id, c_8.user_add, c_8.org_add, c_8.server_add, c_8.date_add
  • Index Cond: (pv.country_add = c_8.id)
  • Buffers: shared hit=80
86. 0.120 0.120 ↑ 1.0 1 40

Index Scan using fdc_country_translation_vl_i on nsi.fdc_country_translation t_8 (cost=0.28..0.79 rows=1 width=68) (actual time=0.003..0.003 rows=1 loops=40)

  • Output: t_8.id, t_8.country_id, t_8.language_id, t_8.name, t_8.short_name, t_8.abbreviation
  • Index Cond: ((c_8.id = t_8.country_id) AND (t_8.language_id = lang.get_current_lang_id()))
  • Buffers: shared hit=120
87. 0.080 0.080 ↑ 1.0 1 40

Index Only Scan using fdc_server_list_country_i on parameter.fdc_server_list sl (cost=0.13..0.20 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=40)

  • Output: sl.country_id
  • Index Cond: (sl.country_id = c_8.id)
  • Heap Fetches: 40
  • Buffers: shared hit=80
88. 0.200 1.560 ↑ 1.0 1 40

Aggregate (cost=11.29..11.30 rows=1 width=32) (actual time=0.039..0.039 rows=1 loops=40)

  • Output: string_agg((t_9.name)::text, ', '::text ORDER BY (t_9.name)::text)
  • Buffers: shared hit=200
89. 0.040 1.360 ↑ 1.0 1 40

Nested Loop Left Join (cost=0.28..11.28 rows=1 width=516) (actual time=0.034..0.034 rows=1 loops=40)

  • Output: t_9.name
  • Inner Unique: true
  • Join Filter: (c_9.id = t_9.color_id)
  • Rows Removed by Join Filter: 4
  • Buffers: shared hit=200
90. 0.160 0.360 ↑ 1.0 1 40

Nested Loop (cost=0.28..9.52 rows=1 width=8) (actual time=0.008..0.009 rows=1 loops=40)

  • Output: c_9.id
  • Inner Unique: true
  • Join Filter: (pc.color_id = c_9.id)
  • Rows Removed by Join Filter: 4
  • Buffers: shared hit=160
91. 0.160 0.160 ↑ 1.0 1 40

Index Scan using fdc_pts_colors_psp_i on pts.fdc_pts_color pc (cost=0.28..8.30 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=40)

  • Output: pc.id, pc.pasport_id, pc.color_id, pc.user_add, pc.org_add, pc.server_add, pc.date_add
  • Index Cond: (pc.pasport_id = pv.id)
  • Buffers: shared hit=120
92. 0.040 0.040 ↑ 2.0 5 40

Seq Scan on nsi.fdc_color c_9 (cost=0.00..1.10 rows=10 width=8) (actual time=0.001..0.001 rows=5 loops=40)

  • Output: c_9.id, c_9.code, c_9.date_from, c_9.date_to, c_9.history_id, c_9.user_add, c_9.org_add, c_9.server_add, c_9.date_add, c_9.is_protected, c_9.is_approved
  • Buffers: shared hit=40
93. 0.960 0.960 ↓ 5.0 5 40

Seq Scan on nsi.fdc_color_translation t_9 (cost=0.00..1.75 rows=1 width=524) (actual time=0.007..0.024 rows=5 loops=40)

  • Output: t_9.id, t_9.color_id, t_9.language_id, t_9.name
  • Filter: (t_9.language_id = lang.get_current_lang_id())
  • Buffers: shared hit=40
94. 1.080 1.080 ↑ 1.0 1 40

Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.027..0.027 rows=1 loops=40)

  • Output: secr.get_current_user_country_id()
  • Buffers: shared hit=40
95. 0.320 3.600 ↑ 1.0 1 40

Aggregate (cost=18.05..18.06 rows=1 width=208) (actual time=0.090..0.090 rows=1 loops=40)

  • Output: string_agg(concat_ws(' '::text, t_10.name, t_11.name), ', '::text ORDER BY t_10.name, t_11.name), max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.id ELSE NULL::bigint END), max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN c_11.code ELSE NULL::character varying END)::text), max((CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN t_11.name ELSE NULL::character varying END)::text), NULL::bigint, max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_sum ELSE NULL::numeric END), max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_value ELSE NULL::numeric END), max(CASE WHEN (rdv.country_id = (secr.get_current_user_country_id())) THEN rdv.tax_coeff ELSE NULL::numeric END)
  • Buffers: shared hit=613
96. 0.094 3.280 ↑ 1.0 1 40

Nested Loop Left Join (cost=8.86..18.02 rows=1 width=727) (actual time=0.061..0.082 rows=1 loops=40)

  • Output: t_10.name, t_11.name, rdv.country_id, c_11.id, c_11.code, rdv.tax_sum, rdv.tax_value, rdv.tax_coeff
  • Inner Unique: true
  • Join Filter: (c_11.id = t_11.payment_execution_id)
  • Buffers: shared hit=613
97. 0.042 2.920 ↑ 1.0 1 40

Nested Loop Left Join (cost=8.86..16.78 rows=1 width=211) (actual time=0.053..0.073 rows=1 loops=40)

  • Output: rdv.country_id, rdv.tax_sum, rdv.tax_value, rdv.tax_coeff, t_10.name, c_11.id, c_11.code
  • Inner Unique: true
  • Join Filter: (c_11.id = rdv.payment_execution_id)
  • Buffers: shared hit=575
98. 0.082 2.840 ↑ 1.0 1 40

Nested Loop Left Join (cost=8.86..15.71 rows=1 width=73) (actual time=0.050..0.071 rows=1 loops=40)

  • Output: rdv.country_id, rdv.tax_sum, rdv.tax_value, rdv.tax_coeff, rdv.payment_execution_id, t_10.name
  • Buffers: shared hit=537
99. 0.364 2.720 ↑ 1.0 1 40

Nested Loop Left Join (cost=8.73..15.50 rows=1 width=81) (actual time=0.048..0.068 rows=1 loops=40)

  • Output: rdv.country_id, rdv.tax_sum, rdv.tax_value, rdv.tax_coeff, rdv.payment_execution_id, c_10.id, t_10.name
  • Inner Unique: true
  • Buffers: shared hit=461
100. 0.834 2.280 ↑ 1.0 1 40

Hash Right Join (cost=8.45..14.70 rows=1 width=41) (actual time=0.037..0.057 rows=1 loops=40)

  • Output: rdv.country_id, rdv.tax_sum, rdv.tax_value, rdv.tax_coeff, rdv.payment_execution_id, c_10.id
  • Hash Cond: (c_10.id = rdv.country_id)
  • Buffers: shared hit=347
101. 0.646 0.646 ↑ 1.0 236 38

Seq Scan on nsi.fdc_country c_10 (cost=0.00..5.36 rows=236 width=8) (actual time=0.002..0.017 rows=236 loops=38)

  • Output: c_10.id, c_10.code, c_10.name_eng, c_10.name_padeg, c_10.code_alfa2, c_10.code_alfa3, c_10.date_from, c_10.date_to, c_10.history_id, c_10.user_add, c_10.org_add, c_10.server_add, c_10.date_add
  • Buffers: shared hit=114
102. 0.080 0.800 ↑ 1.0 1 40

Hash (cost=8.44..8.44 rows=1 width=33) (actual time=0.020..0.020 rows=1 loops=40)

  • Output: rdv.country_id, rdv.tax_sum, rdv.tax_value, rdv.tax_coeff, rdv.payment_execution_id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=233
103. 0.720 0.720 ↑ 1.0 1 40

Index Scan using fdc_pts_recycling_duty_date_uk on pts.fdc_pts_recycling_duty rdv (cost=0.41..8.44 rows=1 width=33) (actual time=0.017..0.018 rows=1 loops=40)

  • Output: rdv.country_id, rdv.tax_sum, rdv.tax_value, rdv.tax_coeff, rdv.payment_execution_id
  • Index Cond: (rdv.pasport_root_id = pv.root_id)
  • Filter: ((statement_timestamp() >= rdv.date_from) AND (statement_timestamp() <= rdv.date_to))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=233
104. 0.076 0.076 ↑ 1.0 1 38

Index Scan using fdc_country_translation_vl_i on nsi.fdc_country_translation t_10 (cost=0.28..0.79 rows=1 width=48) (actual time=0.002..0.002 rows=1 loops=38)

  • Output: t_10.id, t_10.country_id, t_10.language_id, t_10.name, t_10.short_name, t_10.abbreviation
  • Index Cond: ((c_10.id = t_10.country_id) AND (t_10.language_id = lang.get_current_lang_id()))
  • Buffers: shared hit=114
105. 0.038 0.038 ↑ 1.0 1 38

Index Only Scan using fdc_server_list_country_i on parameter.fdc_server_list sl_1 (cost=0.13..0.20 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=38)

  • Output: sl_1.country_id
  • Index Cond: (sl_1.country_id = c_10.id)
  • Heap Fetches: 38
  • Buffers: shared hit=76
106. 0.038 0.038 ↑ 3.0 1 38

Seq Scan on nsi.fdc_payment_execution c_11 (cost=0.00..1.03 rows=3 width=146) (actual time=0.001..0.001 rows=1 loops=38)

  • Output: c_11.id, c_11.code, c_11.date_from, c_11.date_to, c_11.history_id
  • Buffers: shared hit=38
107. 0.266 0.266 ↑ 1.0 1 38

Seq Scan on nsi.fdc_payment_execution_translation t_11 (cost=0.00..1.23 rows=1 width=524) (actual time=0.007..0.007 rows=1 loops=38)

  • Output: t_11.id, t_11.payment_execution_id, t_11.language_id, t_11.name
  • Filter: (t_11.language_id = lang.get_current_lang_id())
  • Buffers: shared hit=38
108. 0.040 0.240 ↑ 1.0 1 40

Limit (cost=0.28..8.30 rows=1 width=136) (actual time=0.006..0.006 rows=1 loops=40)

  • Output: NULL::bigint, NULL::bigint, NULL::bigint, NULL::timestamp with time zone, NULL::timestamp with time zone, own.owner_id, NULL::boolean, NULL::bigint, NULL::bigint, NULL::bigint, NULL::timestamp with time zone, NULL::bigint, NULL::boolean, NULL::numeric(24,6), NULL::bigint, NULL::bigint, NULL::bigint
  • Buffers: shared hit=119
109. 0.200 0.200 ↑ 1.0 1 40

Index Scan using fdc_pts_owner_root_i on pts.fdc_pts_owner own (cost=0.28..8.30 rows=1 width=136) (actual time=0.005..0.005 rows=1 loops=40)

  • Output: NULL::bigint, NULL::bigint, NULL::bigint, NULL::timestamp with time zone, NULL::timestamp with time zone, own.owner_id, NULL::boolean, NULL::bigint, NULL::bigint, NULL::bigint, NULL::timestamp with time zone, NULL::bigint, NULL::boolean, NULL::numeric(24,6), NULL::bigint, NULL::bigint, NULL::bigint
  • Index Cond: (own.pasport_root_id = pv.root_id)
  • Filter: own.is_actual
  • Rows Removed by Filter: 0
  • Buffers: shared hit=119
110. 6.960 6.960 ↑ 2.4 2,657 40

Seq Scan on nsi.fdc_person manufacturer_per (cost=0.00..117.67 rows=6,367 width=16) (actual time=0.002..0.174 rows=2,657 loops=40)

  • Output: manufacturer_per.id, manufacturer_per.person_root_id, manufacturer_per.date_from, manufacturer_per.date_to, manufacturer_per.is_local_copy
  • Buffers: shared hit=907
111. 0.040 0.360 ↑ 1.0 1 40

Limit (cost=8.31..8.31 rows=1 width=108) (actual time=0.009..0.009 rows=1 loops=40)

  • Output: NULL::bigint, engine_1.trademark, engine_1.model, engine_1.volume_cylinder, engine_1.maximum_power, engine_1.engine_kind_id
  • Buffers: shared hit=120
112. 0.120 0.320 ↑ 1.0 1 40

Sort (cost=8.31..8.31 rows=1 width=108) (actual time=0.008..0.008 rows=1 loops=40)

  • Output: NULL::bigint, engine_1.trademark, engine_1.model, engine_1.volume_cylinder, engine_1.maximum_power, engine_1.engine_kind_id
  • Sort Key: engine_1.engine_kind_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=120
113. 0.200 0.200 ↑ 1.0 1 40

Index Scan using fdc_pts_engine_psp_i on pts.fdc_pts_engine engine_1 (cost=0.28..8.30 rows=1 width=108) (actual time=0.005..0.005 rows=1 loops=40)

  • Output: NULL::bigint, engine_1.trademark, engine_1.model, engine_1.volume_cylinder, engine_1.maximum_power, engine_1.engine_kind_id
  • Index Cond: (engine_1.pasport_id = pv.id)
  • Buffers: shared hit=120
Planning time : 12.834 ms
Execution time : 701.074 ms