SELECT 
  cscart_bm_snapping.grid_id as grid_id, 
  cscart_bm_snapping.block_id as block_id, 
  IFNULL(
    dynamic_object_content.content, 
    default_content.content
  ) as content, 
  IFNULL(
    dynamic_object_content.object_id, 
    default_content.object_id
  ) AS object_id, 
  IFNULL(
    dynamic_object_content.object_type, 
    default_content.object_type
  ) AS object_type, 
  cscart_bm_block_statuses.object_ids as object_ids, 
  cscart_bm_snapping.*, 
  cscart_bm_blocks.*, 
  cscart_bm_blocks_descriptions.* 
FROM 
  cscart_bm_snapping 
  LEFT JOIN cscart_bm_blocks ON cscart_bm_blocks.block_id = cscart_bm_snapping.block_id 
  LEFT JOIN cscart_bm_block_statuses ON cscart_bm_snapping.snapping_id = cscart_bm_block_statuses.snapping_id 
  AND cscart_bm_block_statuses.object_type LIKE 'categories' 
  LEFT JOIN cscart_bm_blocks_descriptions ON cscart_bm_blocks.block_id = cscart_bm_blocks_descriptions.block_id 
  LEFT JOIN cscart_bm_blocks_content AS default_content ON cscart_bm_blocks.block_id = default_content.block_id 
  AND cscart_bm_blocks_descriptions.lang_code = default_content.lang_code 
  AND default_content.snapping_id = 0 
  AND default_content.object_id = 0 
  AND default_content.object_type like '' 
  LEFT JOIN cscart_bm_blocks_content AS dynamic_object_content ON cscart_bm_blocks.block_id = dynamic_object_content.block_id 
  AND cscart_bm_blocks_descriptions.lang_code = dynamic_object_content.lang_code 
  AND dynamic_object_content.object_id = 5114 
  AND dynamic_object_content.object_type like 'categories' 
WHERE 
  cscart_bm_snapping.grid_id IN (
    7919, 7920, 7921, 7922, 7923, 7924, 9751, 
    9752, 9753, 7929, 7934, 7930, 7931, 
    7932, 7933, 7935, 7936, 7967, 7968, 
    7969, 7970, 7971, 7972
  ) 
  AND cscart_bm_blocks_descriptions.lang_code = 'en' 
ORDER BY 
  cscart_bm_snapping.order, 
  cscart_bm_snapping.block_id

Query time 0.00158

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "20211.06"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "14805.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_bm_snapping",
            "access_type": "range",
            "possible_keys": [
              "grid_id"
            ],
            "key": "grid_id",
            "used_key_parts": [
              "grid_id"
            ],
            "key_length": "4",
            "rows_examined_per_scan": 47,
            "rows_produced_per_join": 47,
            "filtered": "100.00",
            "index_condition": "(`s2cart`.`cscart_bm_snapping`.`grid_id` in (7919,7920,7921,7922,7923,7924,9751,9752,9753,7929,7934,7930,7931,7932,7933,7935,7936,7967,7968,7969,7970,7971,7972))",
            "cost_info": {
              "read_cost": "22.21",
              "eval_cost": "4.70",
              "prefix_cost": "26.91",
              "data_read_per_join": "36K"
            },
            "used_columns": [
              "snapping_id",
              "block_id",
              "grid_id",
              "wrapper",
              "user_class",
              "order",
              "status"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_bm_block_statuses",
            "access_type": "ref",
            "possible_keys": [
              "snapping_id"
            ],
            "key": "snapping_id",
            "used_key_parts": [
              "snapping_id"
            ],
            "key_length": "4",
            "ref": [
              "s2cart.cscart_bm_snapping.snapping_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 47,
            "filtered": "100.00",
            "index_condition": "<if>(is_not_null_compl(cscart_bm_block_statuses), ((`s2cart`.`cscart_bm_snapping`.`snapping_id` = `s2cart`.`cscart_bm_block_statuses`.`snapping_id`) and (`s2cart`.`cscart_bm_block_statuses`.`object_type` like 'categories')), true)",
            "cost_info": {
              "read_cost": "11.75",
              "eval_cost": "4.70",
              "prefix_cost": "43.36",
              "data_read_per_join": "5K"
            },
            "used_columns": [
              "snapping_id",
              "object_ids",
              "object_type"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_bm_blocks",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "block_id"
            ],
            "key_length": "4",
            "ref": [
              "s2cart.cscart_bm_snapping.block_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 47,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "11.75",
              "eval_cost": "4.70",
              "prefix_cost": "59.81",
              "data_read_per_join": "10K"
            },
            "used_columns": [
              "block_id",
              "type",
              "properties",
              "company_id",
              "storefront_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_bm_blocks_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "block_id",
              "lang_code"
            ],
            "key_length": "10",
            "ref": [
              "s2cart.cscart_bm_snapping.block_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 47,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "11.75",
              "eval_cost": "4.70",
              "prefix_cost": "76.26",
              "data_read_per_join": "9K"
            },
            "used_columns": [
              "block_id",
              "lang_code",
              "name"
            ]
          }
        },
        {
          "table": {
            "table_name": "default_content",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "block_id",
              "snapping_id",
              "lang_code",
              "object_id"
            ],
            "key_length": "18",
            "ref": [
              "s2cart.cscart_bm_snapping.block_id",
              "const",
              "s2cart.cscart_bm_blocks_descriptions.lang_code",
              "const"
            ],
            "rows_examined_per_scan": 9,
            "rows_produced_per_join": 423,
            "filtered": "100.00",
            "index_condition": "<if>(is_not_null_compl(default_content), (`s2cart`.`default_content`.`object_type` like ''), true)",
            "cost_info": {
              "read_cost": "105.75",
              "eval_cost": "42.30",
              "prefix_cost": "224.31",
              "data_read_per_join": "92K"
            },
            "used_columns": [
              "snapping_id",
              "object_id",
              "object_type",
              "block_id",
              "lang_code",
              "content"
            ]
          }
        },
        {
          "table": {
            "table_name": "dynamic_object_content",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "block_id"
            ],
            "key_length": "4",
            "ref": [
              "s2cart.cscart_bm_snapping.block_id"
            ],
            "rows_examined_per_scan": 35,
            "rows_produced_per_join": 14805,
            "filtered": "100.00",
            "index_condition": "<if>(is_not_null_compl(dynamic_object_content), ((`s2cart`.`dynamic_object_content`.`object_id` = 5114) and (`s2cart`.`dynamic_object_content`.`lang_code` = `s2cart`.`cscart_bm_blocks_descriptions`.`lang_code`) and (`s2cart`.`dynamic_object_content`.`object_type` like 'categories')), true)",
            "cost_info": {
              "read_cost": "3701.25",
              "eval_cost": "1480.50",
              "prefix_cost": "5406.06",
              "data_read_per_join": "3M"
            },
            "used_columns": [
              "object_id",
              "object_type",
              "block_id",
              "lang_code",
              "content"
            ]
          }
        }
      ]
    }
  }
}

Result

grid_id block_id content object_id object_type object_ids snapping_id wrapper user_class order status type properties company_id storefront_id lang_code name
7930 878 0 10233 blocks/wrappers/footer_general.tpl 0 A template a:1:{s:8:"template";s:44:"blocks/static_templates/my_account_links.tpl";} 0 3 en My account
7969 906 0 10278 0 A template a:1:{s:8:"template";s:60:"blocks/static_templates/abt__ut2__categories_title_block.tpl";} 0 3 en Category page title
7924 962 0 10227 hidden-phone 0 A template a:2:{s:8:"template";s:49:"blocks/static_templates/abt__ut2__top_buttons.tpl";s:22:"abt__ut2_demo_block_id";s:0:"";} 0 3 en AB: Buttons Compare and Wishlist
7968 979 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:2:"31";}} 0 10277 0 D banners a:4:{s:8:"template";s:57:"addons/abt__unitheme2/blocks/abt__ut2_banner_combined.tpl";s:6:"margin";s:1:"0";s:6:"height";s:5:"320px";s:22:"abt__ut2_demo_block_id";s:18:"banner_in_category";} 0 3 en Banners in the category (top)
7919 1302 0 10215 0 A geo_maps_customer_location a:2:{s:8:"template";s:44:"addons/geo_maps/blocks/customer_location.tpl";s:17:"abt__ut2_fly_menu";s:26:"geo_maps_customer_location";} 0 3 en Customer location
7920 1303 a:1:{s:4:"text";s:0:"";} 0 10216 0 D languages a:6:{s:8:"template";s:20:"blocks/languages.tpl";s:22:"abt__ut2_demo_block_id";s:0:"";s:4:"text";s:10:"Languages:";s:6:"format";s:22:"ab__name_without_icons";s:14:"dropdown_limit";s:1:"4";s:17:"abt__ut2_fly_menu";s:9:"languages";} 0 3 en FLY: Languages
7920 1304 a:1:{s:4:"text";s:0:"";} 0 10217 0 D currencies a:6:{s:8:"template";s:21:"blocks/currencies.tpl";s:22:"abt__ut2_demo_block_id";s:0:"";s:4:"text";s:11:"Currencies:";s:6:"format";s:6:"symbol";s:14:"dropdown_limit";s:2:"10";s:17:"abt__ut2_fly_menu";s:10:"currencies";} 0 3 en FLY: Currencies
7933 1315 a:1:{s:7:"content";s:677:"<ul> <li>{$settings.Company.company_city}, {$settings.Company.company_address}</li> <li><a href="tel:{$settings.Company.company_phone}"><bdi>{$settings.Company.company_phone}</bdi> (the call is free)</a></li> <li><a href="tel:{$settings.Company.company_phone_2}"><bdi>{$settings.Company.company_phone_2}</bdi></a></li> <li>{__('weekday_abr_1')}-{__('weekday_abr_0')} 9.00 - 18.00</li> <li><a class="ty-exception__links-a greeny" href="mailto:{$settings.Company.company_users_department}">{$settings.Company.company_users_department}</a></li> <li><a href="{'pages.view&page_id=20'|fn_url}" class="ty-exception__links-a">{__('view_on_map')}</a></li> </ul>";} 0 10236 blocks/wrappers/footer_general.tpl footer-no-wysiwyg 0 A safe_smarty_block a:2:{s:8:"template";s:28:"blocks/safe_smarty_block.tpl";s:17:"abt__ut2_fly_menu";s:8:"contacts";} 0 3 en Contact us
7967 1342 0 10275 blocks/wrappers/abt__ut2_onclick_dropdown_outside_position.tpl ut2-categories hidden-tablet hidden-desktop 0 A abt__ut2_advanced_subcategories_menu a:5:{s:8:"template";s:69:"addons/abt__unitheme2/blocks/abt__ut2_advanced_subcategories_menu.tpl";s:22:"abt__ut2_demo_block_id";s:0:"";s:21:"abt__ut2_show_parents";s:1:"Y";s:22:"abt__ut2_show_siblings";s:1:"Y";s:22:"abt__ut2_show_children";s:1:"Y";} 0 3 en Categories
7970 1343 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:0:"";}} 0 10280 0 A product_filters a:2:{s:8:"template";s:58:"blocks/product_filters/for_category/horizontal_filters.tpl";s:22:"abt__ut2_demo_block_id";s:0:"";} 0 3 en Horizontal filters
7971 1378 0 10283 blocks/wrappers/abt__ut2__mainbox_simple.tpl ut2-subcategories-block hidden-phone 0 A abt__ut2_advanced_subcategories_menu a:1:{s:8:"template";s:69:"addons/abt__unitheme2/blocks/abt__ut2_advanced_subcategories_menu.tpl";} 0 3 en Сategories
7922 1385 a:1:{s:4:"menu";s:1:"6";} 0 10222 blocks/wrappers/onclick_dropdown.tpl top-menu-grid-vetrtical 0 D menu a:13:{s:8:"template";s:46:"blocks/menu/abt__ut2_dropdown_vertical_mwi.tpl";s:21:"abt__ut2_filling_type";s:14:"column_filling";s:22:"abt__ut2_columns_count";s:1:"4";s:22:"abt__menu_compact_view";s:1:"N";s:19:"abt_menu_icon_items";s:1:"Y";s:36:"no_hidden_elements_second_level_view";s:1:"5";s:36:"elements_per_column_third_level_view";s:2:"30";s:30:"dropdown_second_level_elements";s:2:"30";s:29:"dropdown_third_level_elements";s:2:"30";s:18:"abt_menu_ajax_load";s:1:"N";s:31:"abt__ut2_view_more_btn_behavior";s:10:"view_items";s:24:"abt__ut2_menu_min_height";s:3:"550";s:22:"abt__ut2_demo_block_id";s:9:"main_menu";} 0 3 en Categories
9753 1436 a:3:{s:5:"width";s:4:"1980";s:6:"height";s:3:"600";s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:19:"9440,9441,9439,9436";}} 0 12509 0 A banners a:6:{s:8:"template";s:66:"addons/abt__unitheme2/blocks/abt__ut2_banner_carousel_combined.tpl";s:6:"margin";s:1:"0";s:6:"height";s:3:"700";s:13:"height_mobile";s:3:"552";s:10:"navigation";s:1:"D";s:5:"delay";s:1:"3";} 0 3 en Aqua-banner
7923 1437 0 12513 0 A template a:1:{s:8:"template";s:34:"blocks/static_templates/search.tpl";} 0 3 en Search Aquawagon
9751 690 a:1:{s:4:"menu";s:1:"9";} 0 12512 1 A menu a:4:{s:8:"template";s:35:"blocks/menu/dropdown_horizontal.tpl";s:30:"dropdown_second_level_elements";s:2:"12";s:29:"dropdown_third_level_elements";s:1:"6";s:27:"open_on_sticky_panel_button";s:1:"N";} 0 3 en aquawagonmenu
7971 734 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:0:"";}} 0 10284 blocks/wrappers/abt__ut2__mainbox_simple.tpl ut2-filters hidden-phone 1 A product_filters a:1:{s:8:"template";s:48:"blocks/product_filters/for_category/original.tpl";} 0 3 en Product filters
7924 877 0 10228 ut2-top-my-account hidden-phone 1 A my_account a:1:{s:8:"template";s:21:"blocks/my_account.tpl";} 0 3 en Account
7919 889 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:2:"24";}} 0 12507 1 A banners a:3:{s:8:"template";s:57:"addons/abt__unitheme2/blocks/abt__ut2_banner_combined.tpl";s:6:"margin";s:1:"0";s:6:"height";s:5:"510px";} 0 3 en AB: Banner 3
7970 909 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:0:"";}} 0 10281 1 A product_filters a:1:{s:8:"template";s:65:"blocks/product_filters/for_category/abt__ut2_selected_filters.tpl";} 0 3 en Selected product filters
7967 980 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:0:"";}} 0 10276 blocks/wrappers/abt__ut2_onclick_dropdown_outside_position.tpl ut2-filters hidden-desktop hidden-tablet 1 A product_filters a:1:{s:8:"template";s:48:"blocks/product_filters/for_category/original.tpl";} 0 3 en Filters
7920 1305 0 10218 1 D template a:3:{s:8:"template";s:48:"blocks/static_templates/abt__ut2__my_account.tpl";s:22:"abt__ut2_demo_block_id";s:0:"";s:17:"abt__ut2_fly_menu";s:10:"my_account";} 0 3 en My Account (block)
7920 1306 a:1:{s:4:"text";s:0:"";} 0 10219 top-languages 1 A languages a:5:{s:8:"template";s:20:"blocks/languages.tpl";s:22:"abt__ut2_demo_block_id";s:0:"";s:4:"text";s:0:"";s:6:"format";s:22:"ab__name_without_icons";s:14:"dropdown_limit";s:1:"0";} 0 3 en Languages
7922 1312 a:1:{s:13:"settings_link";s:0:"";} 0 10223 1 A abt__ut2_fly_menu a:6:{s:8:"template";s:50:"addons/abt__unitheme2/blocks/abt__ut2_fly_menu.tpl";s:19:"abt_menu_icon_items";s:1:"Y";s:36:"elements_per_column_third_level_view";s:1:"5";s:19:"abt__ut2_show_title";s:1:"N";s:22:"abt__ut2_demo_block_id";s:0:"";s:27:"open_on_sticky_panel_button";s:1:"Y";} 0 3 en AB: FLY menu
7931 1313 a:1:{s:7:"content";s:611:" <ul id="demo_store_links"> <li class="ty-footer-menu__item"><a href="{"pages.view?page_id=2"|fn_url}">About us</a></li> <li class="ty-footer-menu__item"><a href="{"pages.view?page_id=30"|fn_url}">Contact us</a></li> <li class="ty-footer-menu__item"><a href="{"gift_certificates.add"|fn_url}">Gift certificates</a></li> <li class="ty-footer-menu__item"><a href="{"product_features.view_all?filter_id=10"|fn_url}">Our brands</a></li> <li class="ty-footer-menu__item"><a href="{"sitemap.view"|fn_url}">Sitemap</a></li> <li class="ty-footer-menu__item"><a href="{"pages.view?page_id=7"|fn_url}">Blog</a></li> </ul>";} 0 10234 blocks/wrappers/footer_general.tpl footer-no-wysiwyg 1 A safe_smarty_block a:1:{s:8:"template";s:28:"blocks/safe_smarty_block.tpl";} 0 3 en Demo Store
7969 1317 a:6:{s:4:"menu";s:1:"5";s:22:"ab__fn_show_common_btn";s:1:"N";s:22:"ab__fn_common_btn_text";s:0:"";s:27:"ab__fn_show_common_btn_link";s:0:"";s:23:"ab__fn_common_btn_class";s:0:"";s:22:"ab__fn_common_btn_type";s:14:"ab__fn_cbt_btn";} 0 10279 1 D ab__fast_navigation a:9:{s:8:"template";s:74:"addons/ab__fast_navigation/blocks/ab__fast_navigation/ab__fn_one_level.tpl";s:19:"ab__fn_display_type";s:11:"ab__fn_grid";s:32:"ab__fn_number_of_columns_desktop";s:2:"10";s:38:"ab__fn_number_of_columns_desktop_small";s:1:"6";s:31:"ab__fn_number_of_columns_tablet";s:1:"5";s:37:"ab__fn_number_of_columns_tablet_small";s:1:"4";s:31:"ab__fn_number_of_columns_mobile";s:1:"3";s:17:"ab__fn_icon_width";s:3:"100";s:22:"abt__ut2_demo_block_id";s:0:"";} 0 3 en AB: Fast Navigation Catalog
7970 692 0 10282 2 A main 0 3 en Main Content
7935 699 0 10237 2 A template a:1:{s:8:"template";s:37:"blocks/static_templates/copyright.tpl";} 0 3 en Copyright
7936 700 0 10238 2 A template a:1:{s:8:"template";s:41:"blocks/static_templates/payment_icons.tpl";} 0 3 en Payment icons
7924 740 0 10229 ut2-top-cart-content 2 A cart_content a:4:{s:8:"template";s:23:"blocks/cart_content.tpl";s:22:"display_bottom_buttons";s:1:"Y";s:20:"display_delete_icons";s:1:"Y";s:19:"products_links_type";s:4:"text";} 0 3 en Cart content
7972 916 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:19:"223,184,274,276,238";}} 0 10285 blocks/wrappers/abt__ut2__mainbox_general.tpl ut2-bestsellers-block 2 A products a:3:{s:8:"template";s:40:"blocks/products/products_small_items.tpl";s:11:"item_number";s:1:"Y";s:23:"hide_add_to_cart_button";s:1:"Y";} 0 3 en Bestsellers
7920 1307 0 10220 top-currencies 2 A currencies a:4:{s:8:"template";s:21:"blocks/currencies.tpl";s:4:"text";s:0:"";s:6:"format";s:6:"symbol";s:14:"dropdown_limit";s:1:"3";} 0 3 en Currencies
7932 1314 a:1:{s:7:"content";s:705:" <ul id="customer_service_links"> <li class="ty-footer-menu__item"><a href="{"orders.search"|fn_url}">About your order</a></li> {if $addons.wishlist && $addons.wishlist.status == 'A'} <li class="ty-footer-menu__item"><a href="{"wishlist.view"|fn_url}">Wishlist</a></li> {/if} {if $settings.General.enable_compare_products == 'Y'} <li class="ty-footer-menu__item"><a href="{"product_features.compare"|fn_url}">Comparison list</a></li> {/if} </ul>";} 0 10235 blocks/wrappers/footer_general.tpl footer-no-wysiwyg 2 A safe_smarty_block a:1:{s:8:"template";s:28:"blocks/safe_smarty_block.tpl";} 0 3 en Customer Service
7922 1369 0 10224 top-logo 2 A template a:3:{s:8:"template";s:32:"blocks/static_templates/logo.tpl";s:11:"enable_link";s:1:"Y";s:17:"abt__ut2_fly_menu";s:8:"top_logo";} 0 3 en Logo
7923 1375 0 10226 2 A template a:6:{s:8:"template";s:46:"blocks/static_templates/abt__ut2__contacts.tpl";s:49:"abt__ut2__block_contacts_show_call_request_button";s:1:"Y";s:44:"abt__ut2__block_contacts_show_social_buttons";s:1:"Y";s:35:"abt__ut2__block_contacts_show_email";s:1:"Y";s:36:"abt__ut2__block_contacts_show_addres";s:1:"Y";s:22:"abt__ut2_demo_block_id";s:0:"";} 0 3 en Contacts
7920 982 a:1:{s:4:"menu";s:1:"1";} 0 10221 top-quick-links 3 A menu a:3:{s:8:"template";s:26:"blocks/menu/text_links.tpl";s:18:"show_items_in_line";s:1:"Y";s:22:"abt__ut2_demo_block_id";s:8:"top_menu";} 0 3 en Quick links
9752 1436 a:3:{s:5:"width";s:4:"1980";s:6:"height";s:3:"600";s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:19:"9440,9441,9439,9436";}} 0 12511 hidden-desktop 3 A banners a:6:{s:8:"template";s:66:"addons/abt__unitheme2/blocks/abt__ut2_banner_carousel_combined.tpl";s:6:"margin";s:1:"0";s:6:"height";s:3:"700";s:13:"height_mobile";s:3:"552";s:10:"navigation";s:1:"D";s:5:"delay";s:1:"3";} 0 3 en Aqua-banner