explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9963

Settings
# exclusive inclusive rows x rows loops node
1. 0.021 18,577.329 ↑ 1.0 5 1

Limit (cost=1,372,548.86..1,372,548.87 rows=5 width=1,427) (actual time=18,577.307..18,577.329 rows=5 loops=1)

  • Output: cashflow_collections.id, cashflow_collections.alive, cashflow_collections.external_id, cashflow_collections."timestamp", cashflow_collections.machine_id, cashflow_collections.user_id, cashflow_collections.route_id, cashflow_collections.induction_id, cashflow_collections.init_time, cashflow_collections.message_id, cashflow_collections.external_route_id, cashflow_collections.external_route_name, cashflow_collections.counter_action, cashflow_collections.total_coin_change, cashflow_collections.total_cash_sales, cashflow_collections.total_number_of_cash_sales, cashflow_collections.total_cashless_revaluation, cashflow_collections.total_cashless_overpay, cashflow_collections.total_overpay, cashflow_collections.total_cashless_televend, cashflow_collections.total_cashless_mdb, cashflow_collections.total_cashless_2_overpay, cashflow_collections.total_cashless_2_mdb, cashflow_collections.total_cashless_2_revaluation, cashflow_collections.total_cashless_3_overpay, cashflow_collections.total_cashless_3_mdb, cashflow_collections.total_cashless_3_revaluation, cashflow_collections.total_cashless_revaluation_da401, cashflow_collections.total_tokens_num, cashflow_collections.total_tokens_value, cashflow_collections.in_test_mode, machines.id, machines.alive, machines.urgency, machines.daily_urgencies, machines.urgency_reason, machines.daily_urgency_reasons, machines.recommended_visit_after, machines.urgent_visit_after, machines.external_id, machines.owner_id, machines.warehouse_id, machines.type_id, machines.caption, machines.status_id, machines.data_id, machines.enabled, machines.location_id, machines.author_info_id, machines.deleted, machines.deleted_time, machines.deleted_by_id, machines.televend_configuration, machines.price_multiplier, machines.service_user, machines.product_template_id, machines.product_warning_percentage, machines.component_warning_percentage, machines.mail_notification, machines.stock, machines.stock_data, machines.last_stock_calculation, machines.shelf_life_warning, machines.shelf_life_warning_mail_notification, machines.pricelist_count, machines.current_pricelist_count, machines.use_column_mapping, machines.use_second_column_mapping, machines.offset_mapping, machines.client_id, machines.category_id, machines.send_eva_to_erp, machines.send_lto_to_erp, machines.erp_integration_type, machines.generate_eva_on_cash_collection, machines.use_dm, machines.use_dm_as_proxy, machines.tax_id, machines.tax_address, machines.vat_exemption, machines.new_route_active, machines.new_route_name, machines.new_route_id, machines.new_route_details, machines.external_temperature_info, machines.postponed_product_rotation, machines.fiscalization_type, machines.fiscal_group, machines.machine_tax_location, machines.cashless_1_offset, vending_companies.id, vending_companies.alive, vending_companies.caption, vending_companies.address, vending_companies.city, vending_companies.phone, vending_companies.email, vending_companies.external_id, vending_companies.logo, vending_companies.enabled, vending_companies.note, vending_companies.aes_key, vending_companies.author_info_id, vending_companies.truck_stock, vending_companies.distributor_id, vending_companies.access_id, vending_companies.type, vending_companies.country_code, vending_companies.currency, vending_companies.timezone, vending_companies.wallet_creation, vending_companies.urgency_limit_3, vending_companies.urgency_limit_4, vending_companies.expiry_affects_urgency, vending_companies.day_urg_3, vending_companies.day_urg_4, vending_companies.facing_affects_urgency, vending_companies.facing_urgency_3, vending_companies.facing_urgency_4, vending_companies.working_days, vending_companies.cashreport_time, vending_companies.urgency_calculation_time, vending_companies.urgency_calculation_times, vending_companies.decimal_places, vending_companies.default_max_credit, vending_companies.televend_keep_alive_addresses, vending_companies.default_device_type_id, vending_companies.undefined_column_forced_warning, vending_companies.status, vending_companies.route_microservice, vending_companies.light_speed_integration, vending_companies.amiclo, vending_companies.extra_pricelists_setting, vending_companies.column_mapping_setting, vending_companies.days_between_cc, auth_user.id, auth_user.password, auth_user.last_login, auth_user.is_superuser, auth_user.username, auth_user.first_name, auth_user.last_name, auth_user.email, auth_user.is_staff, auth_user.is_active, auth_user.date_joined, custom_users.user_ptr_id, custom_users.alive, custom_users.external_id, custom_users.warehouse_id, custom_users.avatar, custom_users.avatar_thumb, custom_users.company_id, custom_users.vehicle_id, custom_users.role, custom_users.user_role_id, custom_users.tel, custom_users.dashboard_config_id, custom_users.preferred_language, custom_users.api_service, custom_users.uses_boxes, custom_users.event_types, custom_users.notify_email, custom_users.notify_sms, custom_users.weekday_mask, custom_users.timezone, custom_users.errors_subscription, custom_users.product_subscription, custom_users.info_subscription, custom_users.import_subscription, custom_users.mobile_notes, custom_users.assignment_type, custom_users._assigned_clients, custom_users.starting_point, custom_users.end_point, custom_users.access_all_company, custom_users.technician_view, custom_users.device_info, custom_users.device_notification, custom_users.changed_by_id, custom_users.creator_id
  • Buffers: shared hit=7112505, temp read=4518 written=4516
2. 3,898.201 18,577.308 ↑ 48,391.0 5 1

Sort (cost=1,372,548.86..1,373,153.75 rows=241,955 width=1,427) (actual time=18,577.306..18,577.308 rows=5 loops=1)

  • Output: cashflow_collections.id, cashflow_collections.alive, cashflow_collections.external_id, cashflow_collections."timestamp", cashflow_collections.machine_id, cashflow_collections.user_id, cashflow_collections.route_id, cashflow_collections.induction_id, cashflow_collections.init_time, cashflow_collections.message_id, cashflow_collections.external_route_id, cashflow_collections.external_route_name, cashflow_collections.counter_action, cashflow_collections.total_coin_change, cashflow_collections.total_cash_sales, cashflow_collections.total_number_of_cash_sales, cashflow_collections.total_cashless_revaluation, cashflow_collections.total_cashless_overpay, cashflow_collections.total_overpay, cashflow_collections.total_cashless_televend, cashflow_collections.total_cashless_mdb, cashflow_collections.total_cashless_2_overpay, cashflow_collections.total_cashless_2_mdb, cashflow_collections.total_cashless_2_revaluation, cashflow_collections.total_cashless_3_overpay, cashflow_collections.total_cashless_3_mdb, cashflow_collections.total_cashless_3_revaluation, cashflow_collections.total_cashless_revaluation_da401, cashflow_collections.total_tokens_num, cashflow_collections.total_tokens_value, cashflow_collections.in_test_mode, machines.id, machines.alive, machines.urgency, machines.daily_urgencies, machines.urgency_reason, machines.daily_urgency_reasons, machines.recommended_visit_after, machines.urgent_visit_after, machines.external_id, machines.owner_id, machines.warehouse_id, machines.type_id, machines.caption, machines.status_id, machines.data_id, machines.enabled, machines.location_id, machines.author_info_id, machines.deleted, machines.deleted_time, machines.deleted_by_id, machines.televend_configuration, machines.price_multiplier, machines.service_user, machines.product_template_id, machines.product_warning_percentage, machines.component_warning_percentage, machines.mail_notification, machines.stock, machines.stock_data, machines.last_stock_calculation, machines.shelf_life_warning, machines.shelf_life_warning_mail_notification, machines.pricelist_count, machines.current_pricelist_count, machines.use_column_mapping, machines.use_second_column_mapping, machines.offset_mapping, machines.client_id, machines.category_id, machines.send_eva_to_erp, machines.send_lto_to_erp, machines.erp_integration_type, machines.generate_eva_on_cash_collection, machines.use_dm, machines.use_dm_as_proxy, machines.tax_id, machines.tax_address, machines.vat_exemption, machines.new_route_active, machines.new_route_name, machines.new_route_id, machines.new_route_details, machines.external_temperature_info, machines.postponed_product_rotation, machines.fiscalization_type, machines.fiscal_group, machines.machine_tax_location, machines.cashless_1_offset, vending_companies.id, vending_companies.alive, vending_companies.caption, vending_companies.address, vending_companies.city, vending_companies.phone, vending_companies.email, vending_companies.external_id, vending_companies.logo, vending_companies.enabled, vending_companies.note, vending_companies.aes_key, vending_companies.author_info_id, vending_companies.truck_stock, vending_companies.distributor_id, vending_companies.access_id, vending_companies.type, vending_companies.country_code, vending_companies.currency, vending_companies.timezone, vending_companies.wallet_creation, vending_companies.urgency_limit_3, vending_companies.urgency_limit_4, vending_companies.expiry_affects_urgency, vending_companies.day_urg_3, vending_companies.day_urg_4, vending_companies.facing_affects_urgency, vending_companies.facing_urgency_3, vending_companies.facing_urgency_4, vending_companies.working_days, vending_companies.cashreport_time, vending_companies.urgency_calculation_time, vending_companies.urgency_calculation_times, vending_companies.decimal_places, vending_companies.default_max_credit, vending_companies.televend_keep_alive_addresses, vending_companies.default_device_type_id, vending_companies.undefined_column_forced_warning, vending_companies.status, vending_companies.route_microservice, vending_companies.light_speed_integration, vending_companies.amiclo, vending_companies.extra_pricelists_setting, vending_companies.column_mapping_setting, vending_companies.days_between_cc, auth_user.id, auth_user.password, auth_user.last_login, auth_user.is_superuser, auth_user.username, auth_user.first_name, auth_user.last_name, auth_user.email, auth_user.is_staff, auth_user.is_active, auth_user.date_joined, custom_users.user_ptr_id, custom_users.alive, custom_users.external_id, custom_users.warehouse_id, custom_users.avatar, custom_users.avatar_thumb, custom_users.company_id, custom_users.vehicle_id, custom_users.role, custom_users.user_role_id, custom_users.tel, custom_users.dashboard_config_id, custom_users.preferred_language, custom_users.api_service, custom_users.uses_boxes, custom_users.event_types, custom_users.notify_email, custom_users.notify_sms, custom_users.weekday_mask, custom_users.timezone, custom_users.errors_subscription, custom_users.product_subscription, custom_users.info_subscription, custom_users.import_subscription, custom_users.mobile_notes, custom_users.assignment_type, custom_users._assigned_clients, custom_users.starting_point, custom_users.end_point, custom_users.access_all_company, custom_users.technician_view, custom_users.device_info, custom_users.device_notification, custom_users.changed_by_id, custom_users.creator_id
  • Sort Key: cashflow_collections."timestamp" DESC
  • Sort Method: top-N heapsort Memory: 35kB
  • Buffers: shared hit=7112505, temp read=4518 written=4516
3. 1,530.642 14,679.107 ↓ 9.7 2,347,872 1

Hash Left Join (cost=722,357.54..1,368,530.08 rows=241,955 width=1,427) (actual time=1,575.224..14,679.107 rows=2,347,872 loops=1)

  • Output: cashflow_collections.id, cashflow_collections.alive, cashflow_collections.external_id, cashflow_collections."timestamp", cashflow_collections.machine_id, cashflow_collections.user_id, cashflow_collections.route_id, cashflow_collections.induction_id, cashflow_collections.init_time, cashflow_collections.message_id, cashflow_collections.external_route_id, cashflow_collections.external_route_name, cashflow_collections.counter_action, cashflow_collections.total_coin_change, cashflow_collections.total_cash_sales, cashflow_collections.total_number_of_cash_sales, cashflow_collections.total_cashless_revaluation, cashflow_collections.total_cashless_overpay, cashflow_collections.total_overpay, cashflow_collections.total_cashless_televend, cashflow_collections.total_cashless_mdb, cashflow_collections.total_cashless_2_overpay, cashflow_collections.total_cashless_2_mdb, cashflow_collections.total_cashless_2_revaluation, cashflow_collections.total_cashless_3_overpay, cashflow_collections.total_cashless_3_mdb, cashflow_collections.total_cashless_3_revaluation, cashflow_collections.total_cashless_revaluation_da401, cashflow_collections.total_tokens_num, cashflow_collections.total_tokens_value, cashflow_collections.in_test_mode, machines.id, machines.alive, machines.urgency, machines.daily_urgencies, machines.urgency_reason, machines.daily_urgency_reasons, machines.recommended_visit_after, machines.urgent_visit_after, machines.external_id, machines.owner_id, machines.warehouse_id, machines.type_id, machines.caption, machines.status_id, machines.data_id, machines.enabled, machines.location_id, machines.author_info_id, machines.deleted, machines.deleted_time, machines.deleted_by_id, machines.televend_configuration, machines.price_multiplier, machines.service_user, machines.product_template_id, machines.product_warning_percentage, machines.component_warning_percentage, machines.mail_notification, machines.stock, machines.stock_data, machines.last_stock_calculation, machines.shelf_life_warning, machines.shelf_life_warning_mail_notification, machines.pricelist_count, machines.current_pricelist_count, machines.use_column_mapping, machines.use_second_column_mapping, machines.offset_mapping, machines.client_id, machines.category_id, machines.send_eva_to_erp, machines.send_lto_to_erp, machines.erp_integration_type, machines.generate_eva_on_cash_collection, machines.use_dm, machines.use_dm_as_proxy, machines.tax_id, machines.tax_address, machines.vat_exemption, machines.new_route_active, machines.new_route_name, machines.new_route_id, machines.new_route_details, machines.external_temperature_info, machines.postponed_product_rotation, machines.fiscalization_type, machines.fiscal_group, machines.machine_tax_location, machines.cashless_1_offset, vending_companies.id, vending_companies.alive, vending_companies.caption, vending_companies.address, vending_companies.city, vending_companies.phone, vending_companies.email, vending_companies.external_id, vending_companies.logo, vending_companies.enabled, vending_companies.note, vending_companies.aes_key, vending_companies.author_info_id, vending_companies.truck_stock, vending_companies.distributor_id, vending_companies.access_id, vending_companies.type, vending_companies.country_code, vending_companies.currency, vending_companies.timezone, vending_companies.wallet_creation, vending_companies.urgency_limit_3, vending_companies.urgency_limit_4, vending_companies.expiry_affects_urgency, vending_companies.day_urg_3, vending_companies.day_urg_4, vending_companies.facing_affects_urgency, vending_companies.facing_urgency_3, vending_companies.facing_urgency_4, vending_companies.working_days, vending_companies.cashreport_time, vending_companies.urgency_calculation_time, vending_companies.urgency_calculation_times, vending_companies.decimal_places, vending_companies.default_max_credit, vending_companies.televend_keep_alive_addresses, vending_companies.default_device_type_id, vending_companies.undefined_column_forced_warning, vending_companies.status, vending_companies.route_microservice, vending_companies.light_speed_integration, vending_companies.amiclo, vending_companies.extra_pricelists_setting, vending_companies.column_mapping_setting, vending_companies.days_between_cc, auth_user.id, auth_user.password, auth_user.last_login, auth_user.is_superuser, auth_user.username, auth_user.first_name, auth_user.last_name, auth_user.email, auth_user.is_staff, auth_user.is_active, auth_user.date_joined, custom_users.user_ptr_id, custom_users.alive, custom_users.external_id, custom_users.warehouse_id, custom_users.avatar, custom_users.avatar_thumb, custom_users.company_id, custom_users.vehicle_id, custom_users.role, custom_users.user_role_id, custom_users.tel, custom_users.dashboard_config_id, custom_users.preferred_language, custom_users.api_service, custom_users.uses_boxes, custom_users.event_types, custom_users.notify_email, custom_users.notify_sms, custom_users.weekday_mask, custom_users.timezone, custom_users.errors_subscription, custom_users.product_subscription, custom_users.info_subscription, custom_users.import_subscription, custom_users.mobile_notes, custom_users.assignment_type, custom_users._assigned_clients, custom_users.starting_point, custom_users.end_point, custom_users.access_all_company, custom_users.technician_view, custom_users.device_info, custom_users.device_notification, custom_users.changed_by_id, custom_users.creator_id
  • Hash Cond: (custom_users.user_ptr_id = auth_user.id)
  • Buffers: shared hit=7112505, temp read=4518 written=4516
4. 1,716.493 13,145.131 ↓ 9.7 2,347,872 1

Hash Left Join (cost=721,589.52..1,364,435.17 rows=241,955 width=1,268) (actual time=1,571.871..13,145.131 rows=2,347,872 loops=1)

  • Output: machines.id, machines.alive, machines.urgency, machines.daily_urgencies, machines.urgency_reason, machines.daily_urgency_reasons, machines.recommended_visit_after, machines.urgent_visit_after, machines.external_id, machines.owner_id, machines.warehouse_id, machines.type_id, machines.caption, machines.status_id, machines.data_id, machines.enabled, machines.location_id, machines.author_info_id, machines.deleted, machines.deleted_time, machines.deleted_by_id, machines.televend_configuration, machines.price_multiplier, machines.service_user, machines.product_template_id, machines.product_warning_percentage, machines.component_warning_percentage, machines.mail_notification, machines.stock, machines.stock_data, machines.last_stock_calculation, machines.shelf_life_warning, machines.shelf_life_warning_mail_notification, machines.pricelist_count, machines.current_pricelist_count, machines.use_column_mapping, machines.use_second_column_mapping, machines.offset_mapping, machines.client_id, machines.category_id, machines.send_eva_to_erp, machines.send_lto_to_erp, machines.erp_integration_type, machines.generate_eva_on_cash_collection, machines.use_dm, machines.use_dm_as_proxy, machines.tax_id, machines.tax_address, machines.vat_exemption, machines.new_route_active, machines.new_route_name, machines.new_route_id, machines.new_route_details, machines.external_temperature_info, machines.postponed_product_rotation, machines.fiscalization_type, machines.fiscal_group, machines.machine_tax_location, machines.cashless_1_offset, vending_companies.id, vending_companies.alive, vending_companies.caption, vending_companies.address, vending_companies.city, vending_companies.phone, vending_companies.email, vending_companies.external_id, vending_companies.logo, vending_companies.enabled, vending_companies.note, vending_companies.aes_key, vending_companies.author_info_id, vending_companies.truck_stock, vending_companies.distributor_id, vending_companies.access_id, vending_companies.type, vending_companies.country_code, vending_companies.currency, vending_companies.timezone, vending_companies.wallet_creation, vending_companies.urgency_limit_3, vending_companies.urgency_limit_4, vending_companies.expiry_affects_urgency, vending_companies.day_urg_3, vending_companies.day_urg_4, vending_companies.facing_affects_urgency, vending_companies.facing_urgency_3, vending_companies.facing_urgency_4, vending_companies.working_days, vending_companies.cashreport_time, vending_companies.urgency_calculation_time, vending_companies.urgency_calculation_times, vending_companies.decimal_places, vending_companies.default_max_credit, vending_companies.televend_keep_alive_addresses, vending_companies.default_device_type_id, vending_companies.undefined_column_forced_warning, vending_companies.status, vending_companies.route_microservice, vending_companies.light_speed_integration, vending_companies.amiclo, vending_companies.extra_pricelists_setting, vending_companies.column_mapping_setting, vending_companies.days_between_cc, cashflow_collections.id, cashflow_collections.alive, cashflow_collections.external_id, cashflow_collections."timestamp", cashflow_collections.machine_id, cashflow_collections.user_id, cashflow_collections.route_id, cashflow_collections.induction_id, cashflow_collections.init_time, cashflow_collections.message_id, cashflow_collections.external_route_id, cashflow_collections.external_route_name, cashflow_collections.counter_action, cashflow_collections.total_coin_change, cashflow_collections.total_cash_sales, cashflow_collections.total_number_of_cash_sales, cashflow_collections.total_cashless_revaluation, cashflow_collections.total_cashless_overpay, cashflow_collections.total_overpay, cashflow_collections.total_cashless_televend, cashflow_collections.total_cashless_mdb, cashflow_collections.total_cashless_2_overpay, cashflow_collections.total_cashless_2_mdb, cashflow_collections.total_cashless_2_revaluation, cashflow_collections.total_cashless_3_overpay, cashflow_collections.total_cashless_3_mdb, cashflow_collections.total_cashless_3_revaluation, cashflow_collections.total_cashless_revaluation_da401, cashflow_collections.total_tokens_num, cashflow_collections.total_tokens_value, cashflow_collections.in_test_mode, custom_users.user_ptr_id, custom_users.alive, custom_users.external_id, custom_users.warehouse_id, custom_users.avatar, custom_users.avatar_thumb, custom_users.company_id, custom_users.vehicle_id, custom_users.role, custom_users.user_role_id, custom_users.tel, custom_users.dashboard_config_id, custom_users.preferred_language, custom_users.api_service, custom_users.uses_boxes, custom_users.event_types, custom_users.notify_email, custom_users.notify_sms, custom_users.weekday_mask, custom_users.timezone, custom_users.errors_subscription, custom_users.product_subscription, custom_users.info_subscription, custom_users.import_subscription, custom_users.mobile_notes, custom_users.assignment_type, custom_users._assigned_clients, custom_users.starting_point, custom_users.end_point, custom_users.access_all_company, custom_users.technician_view, custom_users.device_info, custom_users.device_notification, custom_users.changed_by_id, custom_users.creator_id
  • Hash Cond: (cashflow_collections.user_id = custom_users.user_ptr_id)
  • Buffers: shared hit=7111881, temp read=4518 written=4516
5. 1,137.786 11,423.987 ↓ 9.7 2,347,872 1

Nested Loop (cost=720,982.57..1,360,769.49 rows=241,955 width=1,129) (actual time=1,567.202..11,423.987 rows=2,347,872 loops=1)

  • Output: machines.id, machines.alive, machines.urgency, machines.daily_urgencies, machines.urgency_reason, machines.daily_urgency_reasons, machines.recommended_visit_after, machines.urgent_visit_after, machines.external_id, machines.owner_id, machines.warehouse_id, machines.type_id, machines.caption, machines.status_id, machines.data_id, machines.enabled, machines.location_id, machines.author_info_id, machines.deleted, machines.deleted_time, machines.deleted_by_id, machines.televend_configuration, machines.price_multiplier, machines.service_user, machines.product_template_id, machines.product_warning_percentage, machines.component_warning_percentage, machines.mail_notification, machines.stock, machines.stock_data, machines.last_stock_calculation, machines.shelf_life_warning, machines.shelf_life_warning_mail_notification, machines.pricelist_count, machines.current_pricelist_count, machines.use_column_mapping, machines.use_second_column_mapping, machines.offset_mapping, machines.client_id, machines.category_id, machines.send_eva_to_erp, machines.send_lto_to_erp, machines.erp_integration_type, machines.generate_eva_on_cash_collection, machines.use_dm, machines.use_dm_as_proxy, machines.tax_id, machines.tax_address, machines.vat_exemption, machines.new_route_active, machines.new_route_name, machines.new_route_id, machines.new_route_details, machines.external_temperature_info, machines.postponed_product_rotation, machines.fiscalization_type, machines.fiscal_group, machines.machine_tax_location, machines.cashless_1_offset, vending_companies.id, vending_companies.alive, vending_companies.caption, vending_companies.address, vending_companies.city, vending_companies.phone, vending_companies.email, vending_companies.external_id, vending_companies.logo, vending_companies.enabled, vending_companies.note, vending_companies.aes_key, vending_companies.author_info_id, vending_companies.truck_stock, vending_companies.distributor_id, vending_companies.access_id, vending_companies.type, vending_companies.country_code, vending_companies.currency, vending_companies.timezone, vending_companies.wallet_creation, vending_companies.urgency_limit_3, vending_companies.urgency_limit_4, vending_companies.expiry_affects_urgency, vending_companies.day_urg_3, vending_companies.day_urg_4, vending_companies.facing_affects_urgency, vending_companies.facing_urgency_3, vending_companies.facing_urgency_4, vending_companies.working_days, vending_companies.cashreport_time, vending_companies.urgency_calculation_time, vending_companies.urgency_calculation_times, vending_companies.decimal_places, vending_companies.default_max_credit, vending_companies.televend_keep_alive_addresses, vending_companies.default_device_type_id, vending_companies.undefined_column_forced_warning, vending_companies.status, vending_companies.route_microservice, vending_companies.light_speed_integration, vending_companies.amiclo, vending_companies.extra_pricelists_setting, vending_companies.column_mapping_setting, vending_companies.days_between_cc, cashflow_collections.id, cashflow_collections.alive, cashflow_collections.external_id, cashflow_collections."timestamp", cashflow_collections.machine_id, cashflow_collections.user_id, cashflow_collections.route_id, cashflow_collections.induction_id, cashflow_collections.init_time, cashflow_collections.message_id, cashflow_collections.external_route_id, cashflow_collections.external_route_name, cashflow_collections.counter_action, cashflow_collections.total_coin_change, cashflow_collections.total_cash_sales, cashflow_collections.total_number_of_cash_sales, cashflow_collections.total_cashless_revaluation, cashflow_collections.total_cashless_overpay, cashflow_collections.total_overpay, cashflow_collections.total_cashless_televend, cashflow_collections.total_cashless_mdb, cashflow_collections.total_cashless_2_overpay, cashflow_collections.total_cashless_2_mdb, cashflow_collections.total_cashless_2_revaluation, cashflow_collections.total_cashless_3_overpay, cashflow_collections.total_cashless_3_mdb, cashflow_collections.total_cashless_3_revaluation, cashflow_collections.total_cashless_revaluation_da401, cashflow_collections.total_tokens_num, cashflow_collections.total_tokens_value, cashflow_collections.in_test_mode
  • Buffers: shared hit=7111418, temp read=4518 written=4516
6. 431.080 4,532.969 ↓ 29.7 1,438,308 1

Nested Loop (cost=720,982.14..727,139.00 rows=48,391 width=989) (actual time=1,567.097..4,532.969 rows=1,438,308 loops=1)

  • Output: machines.id, machines.alive, machines.urgency, machines.daily_urgencies, machines.urgency_reason, machines.daily_urgency_reasons, machines.recommended_visit_after, machines.urgent_visit_after, machines.external_id, machines.owner_id, machines.warehouse_id, machines.type_id, machines.caption, machines.status_id, machines.data_id, machines.enabled, machines.location_id, machines.author_info_id, machines.deleted, machines.deleted_time, machines.deleted_by_id, machines.televend_configuration, machines.price_multiplier, machines.service_user, machines.product_template_id, machines.product_warning_percentage, machines.component_warning_percentage, machines.mail_notification, machines.stock, machines.stock_data, machines.last_stock_calculation, machines.shelf_life_warning, machines.shelf_life_warning_mail_notification, machines.pricelist_count, machines.current_pricelist_count, machines.use_column_mapping, machines.use_second_column_mapping, machines.offset_mapping, machines.client_id, machines.category_id, machines.send_eva_to_erp, machines.send_lto_to_erp, machines.erp_integration_type, machines.generate_eva_on_cash_collection, machines.use_dm, machines.use_dm_as_proxy, machines.tax_id, machines.tax_address, machines.vat_exemption, machines.new_route_active, machines.new_route_name, machines.new_route_id, machines.new_route_details, machines.external_temperature_info, machines.postponed_product_rotation, machines.fiscalization_type, machines.fiscal_group, machines.machine_tax_location, machines.cashless_1_offset, vending_companies.id, vending_companies.alive, vending_companies.caption, vending_companies.address, vending_companies.city, vending_companies.phone, vending_companies.email, vending_companies.external_id, vending_companies.logo, vending_companies.enabled, vending_companies.note, vending_companies.aes_key, vending_companies.author_info_id, vending_companies.truck_stock, vending_companies.distributor_id, vending_companies.access_id, vending_companies.type, vending_companies.country_code, vending_companies.currency, vending_companies.timezone, vending_companies.wallet_creation, vending_companies.urgency_limit_3, vending_companies.urgency_limit_4, vending_companies.expiry_affects_urgency, vending_companies.day_urg_3, vending_companies.day_urg_4, vending_companies.facing_affects_urgency, vending_companies.facing_urgency_3, vending_companies.facing_urgency_4, vending_companies.working_days, vending_companies.cashreport_time, vending_companies.urgency_calculation_time, vending_companies.urgency_calculation_times, vending_companies.decimal_places, vending_companies.default_max_credit, vending_companies.televend_keep_alive_addresses, vending_companies.default_device_type_id, vending_companies.undefined_column_forced_warning, vending_companies.status, vending_companies.route_microservice, vending_companies.light_speed_integration, vending_companies.amiclo, vending_companies.extra_pricelists_setting, vending_companies.column_mapping_setting, vending_companies.days_between_cc
  • Buffers: shared hit=121797, temp read=4518 written=4516
7. 0.011 0.011 ↑ 1.0 1 1

Seq Scan on public.vending_companies (cost=0.00..2.62 rows=1 width=293) (actual time=0.010..0.011 rows=1 loops=1)

  • Output: vending_companies.id, vending_companies.alive, vending_companies.caption, vending_companies.address, vending_companies.city, vending_companies.phone, vending_companies.email, vending_companies.external_id, vending_companies.logo, vending_companies.enabled, vending_companies.note, vending_companies.aes_key, vending_companies.author_info_id, vending_companies.truck_stock, vending_companies.distributor_id, vending_companies.access_id, vending_companies.type, vending_companies.country_code, vending_companies.currency, vending_companies.timezone, vending_companies.wallet_creation, vending_companies.urgency_limit_3, vending_companies.urgency_limit_4, vending_companies.expiry_affects_urgency, vending_companies.day_urg_3, vending_companies.day_urg_4, vending_companies.facing_affects_urgency, vending_companies.facing_urgency_3, vending_companies.facing_urgency_4, vending_companies.working_days, vending_companies.cashreport_time, vending_companies.urgency_calculation_time, vending_companies.urgency_calculation_times, vending_companies.decimal_places, vending_companies.default_max_credit, vending_companies.televend_keep_alive_addresses, vending_companies.default_device_type_id, vending_companies.undefined_column_forced_warning, vending_companies.status, vending_companies.route_microservice, vending_companies.light_speed_integration, vending_companies.amiclo, vending_companies.extra_pricelists_setting, vending_companies.column_mapping_setting, vending_companies.days_between_cc
  • Filter: (vending_companies.id = 1)
  • Rows Removed by Filter: 24
  • Buffers: shared hit=2
8. 1,719.697 4,101.878 ↓ 29.7 1,438,308 1

Hash Right Join (cost=720,982.14..726,652.46 rows=48,391 width=696) (actual time=1,567.084..4,101.878 rows=1,438,308 loops=1)

  • Output: machines.id, machines.alive, machines.urgency, machines.daily_urgencies, machines.urgency_reason, machines.daily_urgency_reasons, machines.recommended_visit_after, machines.urgent_visit_after, machines.external_id, machines.owner_id, machines.warehouse_id, machines.type_id, machines.caption, machines.status_id, machines.data_id, machines.enabled, machines.location_id, machines.author_info_id, machines.deleted, machines.deleted_time, machines.deleted_by_id, machines.televend_configuration, machines.price_multiplier, machines.service_user, machines.product_template_id, machines.product_warning_percentage, machines.component_warning_percentage, machines.mail_notification, machines.stock, machines.stock_data, machines.last_stock_calculation, machines.shelf_life_warning, machines.shelf_life_warning_mail_notification, machines.pricelist_count, machines.current_pricelist_count, machines.use_column_mapping, machines.use_second_column_mapping, machines.offset_mapping, machines.client_id, machines.category_id, machines.send_eva_to_erp, machines.send_lto_to_erp, machines.erp_integration_type, machines.generate_eva_on_cash_collection, machines.use_dm, machines.use_dm_as_proxy, machines.tax_id, machines.tax_address, machines.vat_exemption, machines.new_route_active, machines.new_route_name, machines.new_route_id, machines.new_route_details, machines.external_temperature_info, machines.postponed_product_rotation, machines.fiscalization_type, machines.fiscal_group, machines.machine_tax_location, machines.cashless_1_offset
  • Hash Cond: (custom_users_all_machines.machine_id = machines.id)
  • Buffers: shared hit=121795, temp read=4518 written=4516
9. 182.688 2,249.215 ↓ 40.6 1,623,933 1

Subquery Scan on custom_users_all_machines (cost=688,890.82..689,690.82 rows=40,000 width=4) (actual time=1,434.016..2,249.215 rows=1,623,933 loops=1)

  • Output: custom_users_all_machines.machine_id
  • Buffers: shared hit=96151
10. 1,429.744 2,066.527 ↓ 40.6 1,623,933 1

HashAggregate (cost=688,890.82..689,290.82 rows=40,000 width=8) (actual time=1,434.014..2,066.527 rows=1,623,933 loops=1)

  • Output: a.customuser_id, m.id
  • Group Key: a.customuser_id, m.id
  • Buffers: shared hit=96151
11.          

CTE all_clusters

12. 0.370 0.965 ↑ 53.7 994 1

Recursive Union (cost=0.00..10,662.60 rows=53,407 width=8) (actual time=0.013..0.965 rows=994 loops=1)

  • Buffers: shared hit=101
13. 0.133 0.133 ↑ 1.0 947 1

Seq Scan on public.custom_users_assigned_clusters uac1 (cost=0.00..16.47 rows=947 width=8) (actual time=0.009..0.133 rows=947 loops=1)

  • Output: uac1.locationcluster_id, uac1.customuser_id
  • Buffers: shared hit=7
14. 0.116 0.462 ↑ 97.1 54 2

Merge Join (cost=815.13..957.80 rows=5,246 width=8) (actual time=0.143..0.231 rows=54 loops=2)

  • Output: lc_1.id, a_1.customuser_id
  • Merge Cond: (lc_1.parent_id = a_1.locationcluster_id)
  • Buffers: shared hit=94
15. 0.046 0.046 ↑ 5.8 107 2

Index Scan using location_clusters_6be37982 on public.location_clusters lc_1 (cost=0.28..41.58 rows=623 width=8) (actual time=0.005..0.023 rows=107 loops=2)

  • Output: lc_1.id, lc_1.alive, lc_1.caption, lc_1.note, lc_1.map_shape, lc_1.status, lc_1.last_message_timestamp, lc_1.enabled, lc_1.deleted, lc_1.deleted_time, lc_1.author_info_id, lc_1.deleted_by_id, lc_1.owner_id, lc_1.parent_id, lc_1.external_id, lc_1._ver
  • Buffers: shared hit=94
16. 0.216 0.300 ↑ 17.7 536 2

Sort (cost=814.85..838.53 rows=9,470 width=8) (actual time=0.114..0.150 rows=536 loops=2)

  • Output: a_1.customuser_id, a_1.locationcluster_id
  • Sort Key: a_1.locationcluster_id
  • Sort Method: quicksort Memory: 27kB
17. 0.084 0.084 ↑ 19.1 497 2

WorkTable Scan on all_clusters a_1 (cost=0.00..189.40 rows=9,470 width=8) (actual time=0.001..0.042 rows=497 loops=2)

  • Output: a_1.customuser_id, a_1.locationcluster_id
18.          

CTE all_clients

19. 0.756 4.609 ↑ 122.4 5,880 1

Recursive Union (cost=0.00..90,993.54 rows=719,974 width=8) (actual time=0.009..4.609 rows=5,880 loops=1)

  • Buffers: shared hit=2080
20. 0.457 0.457 ↑ 1.0 4,720 1

Seq Scan on public.custom_users_assigned_clients cuc (cost=0.00..75.54 rows=4,854 width=8) (actual time=0.008..0.457 rows=4,720 loops=1)

  • Output: cuc.client_id, cuc.customuser_id
  • Buffers: shared hit=27
21. 0.852 3.396 ↑ 246.6 290 4

Merge Join (cost=4,749.17..7,651.85 rows=71,512 width=8) (actual time=0.407..0.849 rows=290 loops=4)

  • Output: c_1.id, a_2.customuser_id
  • Merge Cond: (c_1.parent_id = a_2.client_id)
  • Buffers: shared hit=2053
22. 0.676 0.676 ↑ 38.5 640 4

Index Scan using clients_6be37982 on public.clients c_1 (cost=0.29..1,768.69 rows=24,640 width=8) (actual time=0.003..0.169 rows=640 loops=4)

  • Output: c_1.id, c_1.caption, c_1.code, c_1.author_info_id, c_1.owner_id, c_1.parent_id, c_1.external_id, c_1.client_type_id, c_1.alive, c_1._ver
  • Buffers: shared hit=2053
23. 1.396 1.868 ↑ 27.9 1,741 4

Sort (cost=4,748.88..4,870.23 rows=48,540 width=8) (actual time=0.347..0.467 rows=1,741 loops=4)

  • Output: a_2.customuser_id, a_2.client_id
  • Sort Key: a_2.client_id
  • Sort Method: quicksort Memory: 25kB
24. 0.472 0.472 ↑ 33.0 1,470 4

WorkTable Scan on all_clients a_2 (cost=0.00..970.80 rows=48,540 width=8) (actual time=0.001..0.118 rows=1,470 loops=4)

  • Output: a_2.customuser_id, a_2.client_id
25. 133.147 636.783 ↑ 9.6 1,624,278 1

Append (cost=6,417.25..508,933.31 rows=15,660,272 width=8) (actual time=32.107..636.783 rows=1,624,278 loops=1)

  • Buffers: shared hit=96151
26. 185.527 320.931 ↑ 7.2 1,505,377 1

Hash Join (cost=6,417.25..146,327.62 rows=10,893,571 width=8) (actual time=32.106..320.931 rows=1,505,377 loops=1)

  • Output: a.customuser_id, m.id
  • Hash Cond: (ml.cluster_id = lc.id)
  • Buffers: shared hit=28033
27. 51.021 133.664 ↑ 1.0 127,075 1

Hash Join (cost=3,926.16..32,588.19 rows=127,075 width=8) (actual time=30.295..133.664 rows=127,075 loops=1)

  • Output: ml.cluster_id, m.id
  • Hash Cond: (m.location_id = ml.id)
  • Buffers: shared hit=27925
28. 52.462 52.462 ↑ 1.0 127,075 1

Seq Scan on public.machines m (cost=0.00..26,914.75 rows=127,075 width=8) (actual time=0.004..52.462 rows=127,075 loops=1)

  • Output: m.id, m.location_id
  • Buffers: shared hit=25644
29. 11.298 30.181 ↑ 1.0 73,118 1

Hash (cost=3,012.18..3,012.18 rows=73,118 width=8) (actual time=30.181..30.181 rows=73,118 loops=1)

  • Output: ml.cluster_id, ml.id
  • Buckets: 131072 Batches: 1 Memory Usage: 3850kB
  • Buffers: shared hit=2281
30. 18.883 18.883 ↑ 1.0 73,118 1

Seq Scan on public.machine_locations ml (cost=0.00..3,012.18 rows=73,118 width=8) (actual time=0.005..18.883 rows=73,118 loops=1)

  • Output: ml.cluster_id, ml.id
  • Buffers: shared hit=2281
31. 0.132 1.740 ↑ 53.7 994 1

Hash (cost=1,823.50..1,823.50 rows=53,407 width=12) (actual time=1.740..1.740 rows=994 loops=1)

  • Output: a.customuser_id, a.locationcluster_id, lc.id
  • Buckets: 65536 Batches: 1 Memory Usage: 555kB
  • Buffers: shared hit=108
32. 0.275 1.608 ↑ 53.7 994 1

Hash Join (cost=21.02..1,823.50 rows=53,407 width=12) (actual time=0.190..1.608 rows=994 loops=1)

  • Output: a.customuser_id, a.locationcluster_id, lc.id
  • Hash Cond: (a.locationcluster_id = lc.id)
  • Buffers: shared hit=108
33. 1.165 1.165 ↑ 53.7 994 1

CTE Scan on all_clusters a (cost=0.00..1,068.14 rows=53,407 width=8) (actual time=0.015..1.165 rows=994 loops=1)

  • Output: a.locationcluster_id, a.customuser_id
  • Buffers: shared hit=101
34. 0.077 0.168 ↓ 1.0 628 1

Hash (cost=13.23..13.23 rows=623 width=4) (actual time=0.168..0.168 rows=628 loops=1)

  • Output: lc.id
  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
  • Buffers: shared hit=7
35. 0.091 0.091 ↓ 1.0 628 1

Seq Scan on public.location_clusters lc (cost=0.00..13.23 rows=623 width=4) (actual time=0.004..0.091 rows=628 loops=1)

  • Output: lc.id
  • Buffers: shared hit=7
36. 4.237 4.237 ↑ 1.2 2,248 1

Seq Scan on public.custom_users_assigned_machines_directly cum (cost=0.00..5,915.78 rows=2,678 width=8) (actual time=0.008..4.237 rows=2,248 loops=1)

  • Output: cum.customuser_id, cum.machine_id
  • Buffers: shared hit=5889
37. 5.912 57.629 ↓ 3.3 55,535 1

Nested Loop (cost=9.35..5,236.35 rows=17,020 width=8) (actual time=3.293..57.629 rows=55,535 loops=1)

  • Output: cut.customuser_id, m_1.id
  • Buffers: shared hit=34140
38. 0.009 0.009 ↑ 1.0 12 1

Seq Scan on public.custom_users_assigned_types cut (cost=0.00..1.12 rows=12 width=8) (actual time=0.006..0.009 rows=12 loops=1)

  • Output: cut.id, cut.customuser_id, cut.machinetype_id
  • Buffers: shared hit=1
39. 46.368 51.708 ↓ 25.0 4,628 12

Bitmap Heap Scan on public.machines m_1 (cost=9.35..434.42 rows=185 width=8) (actual time=0.850..4.309 rows=4,628 loops=12)

  • Output: m_1.id, m_1.type_id
  • Recheck Cond: (m_1.type_id = cut.machinetype_id)
  • Heap Blocks: exact=33814
  • Buffers: shared hit=34139
40. 5.340 5.340 ↓ 25.2 4,658 12

Bitmap Index Scan on machines_94757cae (cost=0.00..9.30 rows=185 width=0) (actual time=0.445..0.445 rows=4,658 loops=12)

  • Index Cond: (m_1.type_id = cut.machinetype_id)
  • Buffers: shared hit=325
41. 6.814 106.503 ↑ 214.3 22,005 1

Merge Join (cost=122,131.99..193,507.29 rows=4,715,995 width=8) (actual time=90.649..106.503 rows=22,005 loops=1)

  • Output: c.customuser_id, m_2.id
  • Merge Cond: (m_2.client_id = c.client_id)
  • Buffers: shared hit=27724
42. 26.945 90.853 ↑ 2.7 47,642 1

Sort (cost=37,687.74..38,005.42 rows=127,075 width=8) (actual time=83.795..90.853 rows=47,642 loops=1)

  • Output: m_2.id, m_2.client_id
  • Sort Key: m_2.client_id
  • Sort Method: quicksort Memory: 9029kB
  • Buffers: shared hit=25644
43. 63.908 63.908 ↑ 1.0 127,075 1

Seq Scan on public.machines m_2 (cost=0.00..26,914.75 rows=127,075 width=8) (actual time=0.003..63.908 rows=127,075 loops=1)

  • Output: m_2.id, m_2.client_id
  • Buffers: shared hit=25644
44. 2.989 8.836 ↑ 27.3 26,358 1

Sort (cost=84,444.26..86,244.19 rows=719,974 width=8) (actual time=6.852..8.836 rows=26,358 loops=1)

  • Output: c.customuser_id, c.client_id
  • Sort Key: c.client_id
  • Sort Method: quicksort Memory: 468kB
  • Buffers: shared hit=2080
45. 5.847 5.847 ↑ 122.4 5,880 1

CTE Scan on all_clients c (cost=0.00..14,399.48 rows=719,974 width=8) (actual time=0.011..5.847 rows=5,880 loops=1)

  • Output: c.customuser_id, c.client_id
  • Buffers: shared hit=2080
46. 9.941 14.336 ↓ 1.3 39,113 1

Hash Join (cost=82.81..1,370.33 rows=31,008 width=8) (actual time=0.689..14.336 rows=39,113 loops=1)

  • Output: mf.customuser_id, mam.machine_id
  • Hash Cond: (mam.machinecluster_id = mc.id)
  • Buffers: shared hit=365
47. 3.728 3.728 ↓ 1.0 46,176 1

Seq Scan on public.machineclusters_assigned_machines mam (cost=0.00..804.41 rows=46,141 width=8) (actual time=0.011..3.728 rows=46,176 loops=1)

  • Output: mam.id, mam.machinecluster_id, mam.machine_id, mam._ver
  • Buffers: shared hit=343
48. 0.113 0.667 ↓ 1.0 882 1

Hash (cost=71.82..71.82 rows=879 width=12) (actual time=0.667..0.667 rows=882 loops=1)

  • Output: mc.id, mf.customuser_id, mf.machinecluster_id
  • Buckets: 1024 Batches: 1 Memory Usage: 46kB
  • Buffers: shared hit=22
49. 0.220 0.554 ↓ 1.0 882 1

Hash Join (cost=25.78..71.82 rows=879 width=12) (actual time=0.213..0.554 rows=882 loops=1)

  • Output: mc.id, mf.customuser_id, mf.machinecluster_id
  • Hash Cond: (mc.id = mf.machinecluster_id)
  • Buffers: shared hit=22
50. 0.134 0.134 ↑ 1.0 1,308 1

Seq Scan on public.machineclusters mc (cost=0.00..29.08 rows=1,308 width=4) (actual time=0.006..0.134 rows=1,308 loops=1)

  • Output: mc.id, mc.caption, mc.cluster_type, mc.last_modified, mc.deleted, mc.deleted_time, mc.author_info_id, mc.company_id, mc.deleted_by_id, mc.external_id, mc._ver
  • Buffers: shared hit=16
51. 0.095 0.200 ↓ 1.0 882 1

Hash (cost=14.79..14.79 rows=879 width=8) (actual time=0.200..0.200 rows=882 loops=1)

  • Output: mf.customuser_id, mf.machinecluster_id
  • Buckets: 1024 Batches: 1 Memory Usage: 43kB
  • Buffers: shared hit=6
52. 0.105 0.105 ↓ 1.0 882 1

Seq Scan on public.machineclusters_fillers mf (cost=0.00..14.79 rows=879 width=8) (actual time=0.007..0.105 rows=882 loops=1)

  • Output: mf.customuser_id, mf.machinecluster_id
  • Buffers: shared hit=6
53. 59.255 132.966 ↑ 1.0 48,391 1

Hash (cost=27,232.44..27,232.44 rows=48,391 width=696) (actual time=132.966..132.966 rows=48,391 loops=1)

  • Output: machines.id, machines.alive, machines.urgency, machines.daily_urgencies, machines.urgency_reason, machines.daily_urgency_reasons, machines.recommended_visit_after, machines.urgent_visit_after, machines.external_id, machines.owner_id, machines.warehouse_id, machines.type_id, machines.caption, machines.status_id, machines.data_id, machines.enabled, machines.location_id, machines.author_info_id, machines.deleted, machines.deleted_time, machines.deleted_by_id, machines.televend_configuration, machines.price_multiplier, machines.service_user, machines.product_template_id, machines.product_warning_percentage, machines.component_warning_percentage, machines.mail_notification, machines.stock, machines.stock_data, machines.last_stock_calculation, machines.shelf_life_warning, machines.shelf_life_warning_mail_notification, machines.pricelist_count, machines.current_pricelist_count, machines.use_column_mapping, machines.use_second_column_mapping, machines.offset_mapping, machines.client_id, machines.category_id, machines.send_eva_to_erp, machines.send_lto_to_erp, machines.erp_integration_type, machines.generate_eva_on_cash_collection, machines.use_dm, machines.use_dm_as_proxy, machines.tax_id, machines.tax_address, machines.vat_exemption, machines.new_route_active, machines.new_route_name, machines.new_route_id, machines.new_route_details, machines.external_temperature_info, machines.postponed_product_rotation, machines.fiscalization_type, machines.fiscal_group, machines.machine_tax_location, machines.cashless_1_offset
  • Buckets: 65536 Batches: 2 Memory Usage: 17887kB
  • Buffers: shared hit=25644, temp written=2132
54. 73.711 73.711 ↑ 1.0 48,391 1

Seq Scan on public.machines (cost=0.00..27,232.44 rows=48,391 width=696) (actual time=0.008..73.711 rows=48,391 loops=1)

  • Output: machines.id, machines.alive, machines.urgency, machines.daily_urgencies, machines.urgency_reason, machines.daily_urgency_reasons, machines.recommended_visit_after, machines.urgent_visit_after, machines.external_id, machines.owner_id, machines.warehouse_id, machines.type_id, machines.caption, machines.status_id, machines.data_id, machines.enabled, machines.location_id, machines.author_info_id, machines.deleted, machines.deleted_time, machines.deleted_by_id, machines.televend_configuration, machines.price_multiplier, machines.service_user, machines.product_template_id, machines.product_warning_percentage, machines.component_warning_percentage, machines.mail_notification, machines.stock, machines.stock_data, machines.last_stock_calculation, machines.shelf_life_warning, machines.shelf_life_warning_mail_notification, machines.pricelist_count, machines.current_pricelist_count, machines.use_column_mapping, machines.use_second_column_mapping, machines.offset_mapping, machines.client_id, machines.category_id, machines.send_eva_to_erp, machines.send_lto_to_erp, machines.erp_integration_type, machines.generate_eva_on_cash_collection, machines.use_dm, machines.use_dm_as_proxy, machines.tax_id, machines.tax_address, machines.vat_exemption, machines.new_route_active, machines.new_route_name, machines.new_route_id, machines.new_route_details, machines.external_temperature_info, machines.postponed_product_rotation, machines.fiscalization_type, machines.fiscal_group, machines.machine_tax_location, machines.cashless_1_offset
  • Filter: (machines.owner_id = 1)
  • Rows Removed by Filter: 78684
  • Buffers: shared hit=25644
55. 0.000 5,753.232 ↑ 2.5 2 1,438,308

Limit (cost=0.42..12.99 rows=5 width=164) (actual time=0.002..0.004 rows=2 loops=1,438,308)

  • Output: cashflow_collections.id, cashflow_collections.alive, cashflow_collections."timestamp", cashflow_collections.init_time, cashflow_collections.counter_action, cashflow_collections.total_coin_change, cashflow_collections.total_cash_sales, cashflow_collections.total_cashless_revaluation, cashflow_collections.total_cashless_overpay, cashflow_collections.total_overpay, cashflow_collections.total_cashless_televend, cashflow_collections.total_cashless_mdb, cashflow_collections.machine_id, cashflow_collections.message_id, cashflow_collections.route_id, cashflow_collections.user_id, cashflow_collections.total_cashless_2_mdb, cashflow_collections.total_cashless_2_overpay, cashflow_collections.total_cashless_2_revaluation, cashflow_collections.total_number_of_cash_sales, cashflow_collections.total_cashless_revaluation_da401, cashflow_collections.external_id, cashflow_collections.induction_id, cashflow_collections.in_test_mode, cashflow_collections.total_tokens_num, cashflow_collections.total_tokens_value, cashflow_collections.total_cashless_3_mdb, cashflow_collections.total_cashless_3_overpay, cashflow_collections.total_cashless_3_revaluation, cashflow_collections.external_route_id, cashflow_collections.external_route_name, NULL::numeric(12,4), NULL::bigint
  • Buffers: shared hit=6989621
56. 5,753.232 5,753.232 ↑ 14.0 2 1,438,308

Index Scan Backward using idx_cashflow_collections_machine_id_timestamp on public.cashflow_collections (cost=0.42..70.81 rows=28 width=164) (actual time=0.002..0.004 rows=2 loops=1,438,308)

  • Output: cashflow_collections.id, cashflow_collections.alive, cashflow_collections."timestamp", cashflow_collections.init_time, cashflow_collections.counter_action, cashflow_collections.total_coin_change, cashflow_collections.total_cash_sales, cashflow_collections.total_cashless_revaluation, cashflow_collections.total_cashless_overpay, cashflow_collections.total_overpay, cashflow_collections.total_cashless_televend, cashflow_collections.total_cashless_mdb, cashflow_collections.machine_id, cashflow_collections.message_id, cashflow_collections.route_id, cashflow_collections.user_id, cashflow_collections.total_cashless_2_mdb, cashflow_collections.total_cashless_2_overpay, cashflow_collections.total_cashless_2_revaluation, cashflow_collections.total_number_of_cash_sales, cashflow_collections.total_cashless_revaluation_da401, cashflow_collections.external_id, cashflow_collections.induction_id, cashflow_collections.in_test_mode, cashflow_collections.total_tokens_num, cashflow_collections.total_tokens_value, cashflow_collections.total_cashless_3_mdb, cashflow_collections.total_cashless_3_overpay, cashflow_collections.total_cashless_3_revaluation, cashflow_collections.external_route_id, cashflow_collections.external_route_name, NULL::numeric(12,4), NULL::bigint
  • Index Cond: (cashflow_collections.machine_id = machines.id)
  • Filter: (cashflow_collections.counter_action = 0)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=6989618
57. 2.234 4.651 ↓ 1.0 6,401 1

Hash (cost=526.98..526.98 rows=6,398 width=139) (actual time=4.651..4.651 rows=6,401 loops=1)

  • Output: custom_users.user_ptr_id, custom_users.alive, custom_users.external_id, custom_users.warehouse_id, custom_users.avatar, custom_users.avatar_thumb, custom_users.company_id, custom_users.vehicle_id, custom_users.role, custom_users.user_role_id, custom_users.tel, custom_users.dashboard_config_id, custom_users.preferred_language, custom_users.api_service, custom_users.uses_boxes, custom_users.event_types, custom_users.notify_email, custom_users.notify_sms, custom_users.weekday_mask, custom_users.timezone, custom_users.errors_subscription, custom_users.product_subscription, custom_users.info_subscription, custom_users.import_subscription, custom_users.mobile_notes, custom_users.assignment_type, custom_users._assigned_clients, custom_users.starting_point, custom_users.end_point, custom_users.access_all_company, custom_users.technician_view, custom_users.device_info, custom_users.device_notification, custom_users.changed_by_id, custom_users.creator_id
  • Buckets: 8192 Batches: 1 Memory Usage: 1063kB
  • Buffers: shared hit=463
58. 2.417 2.417 ↓ 1.0 6,401 1

Seq Scan on public.custom_users (cost=0.00..526.98 rows=6,398 width=139) (actual time=0.005..2.417 rows=6,401 loops=1)

  • Output: custom_users.user_ptr_id, custom_users.alive, custom_users.external_id, custom_users.warehouse_id, custom_users.avatar, custom_users.avatar_thumb, custom_users.company_id, custom_users.vehicle_id, custom_users.role, custom_users.user_role_id, custom_users.tel, custom_users.dashboard_config_id, custom_users.preferred_language, custom_users.api_service, custom_users.uses_boxes, custom_users.event_types, custom_users.notify_email, custom_users.notify_sms, custom_users.weekday_mask, custom_users.timezone, custom_users.errors_subscription, custom_users.product_subscription, custom_users.info_subscription, custom_users.import_subscription, custom_users.mobile_notes, custom_users.assignment_type, custom_users._assigned_clients, custom_users.starting_point, custom_users.end_point, custom_users.access_all_company, custom_users.technician_view, custom_users.device_info, custom_users.device_notification, custom_users.changed_by_id, custom_users.creator_id
  • Buffers: shared hit=463
59. 1.642 3.334 ↑ 1.0 6,401 1

Hash (cost=688.01..688.01 rows=6,401 width=159) (actual time=3.334..3.334 rows=6,401 loops=1)

  • Output: auth_user.id, auth_user.password, auth_user.last_login, auth_user.is_superuser, auth_user.username, auth_user.first_name, auth_user.last_name, auth_user.email, auth_user.is_staff, auth_user.is_active, auth_user.date_joined
  • Buckets: 8192 Batches: 1 Memory Usage: 1312kB
  • Buffers: shared hit=624
60. 1.692 1.692 ↑ 1.0 6,401 1

Seq Scan on public.auth_user (cost=0.00..688.01 rows=6,401 width=159) (actual time=0.006..1.692 rows=6,401 loops=1)

  • Output: auth_user.id, auth_user.password, auth_user.last_login, auth_user.is_superuser, auth_user.username, auth_user.first_name, auth_user.last_name, auth_user.email, auth_user.is_staff, auth_user.is_active, auth_user.date_joined
  • Buffers: shared hit=624
Planning time : 2.656 ms
Execution time : 18,578.086 ms