SELECT 
  bm_snapping.grid_id as grid_id, 
  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, 
  bm_block_statuses.object_ids as object_ids, 
  bm_snapping.*, 
  bm_blocks.*, 
  bm_blocks_descriptions.* 
FROM 
  bm_snapping 
  LEFT JOIN bm_blocks ON bm_blocks.block_id = bm_snapping.block_id 
  LEFT JOIN bm_block_statuses ON bm_snapping.snapping_id = bm_block_statuses.snapping_id 
  AND bm_block_statuses.object_type LIKE 'pages' 
  LEFT JOIN bm_blocks_descriptions ON bm_blocks.block_id = bm_blocks_descriptions.block_id 
  LEFT JOIN bm_blocks_content AS default_content ON bm_blocks.block_id = default_content.block_id 
  AND 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 bm_blocks_content AS dynamic_object_content ON bm_blocks.block_id = dynamic_object_content.block_id 
  AND bm_blocks_descriptions.lang_code = dynamic_object_content.lang_code 
  AND dynamic_object_content.object_id = 105 
  AND dynamic_object_content.object_type like 'pages' 
WHERE 
  bm_snapping.grid_id IN (
    156, 163, 164, 792, 168, 165, 169, 166, 
    167, 878, 879, 880, 881, 888, 886, 887, 
    889, 882, 883, 884, 885, 157, 158, 159, 
    160, 683, 753
  ) 
  AND bm_blocks_descriptions.lang_code = 'en' 
ORDER BY 
  bm_snapping.order, 
  bm_snapping.block_id

Query time 0.00352

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "215.83"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "63.73"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "bm_snapping",
            "access_type": "range",
            "possible_keys": [
              "grid_id"
            ],
            "key": "grid_id",
            "used_key_parts": [
              "grid_id"
            ],
            "key_length": "4",
            "rows_examined_per_scan": 53,
            "rows_produced_per_join": 53,
            "filtered": "100.00",
            "index_condition": "(`goimagine`.`bm_snapping`.`grid_id` in (156,163,164,792,168,165,169,166,167,878,879,880,881,888,886,887,889,882,883,884,885,157,158,159,160,683,753))",
            "cost_info": {
              "read_cost": "35.31",
              "eval_cost": "5.30",
              "prefix_cost": "40.61",
              "data_read_per_join": "41K"
            },
            "used_columns": [
              "snapping_id",
              "block_id",
              "grid_id",
              "wrapper",
              "user_class",
              "order",
              "status",
              "display_on"
            ]
          }
        },
        {
          "table": {
            "table_name": "bm_block_statuses",
            "access_type": "ref",
            "possible_keys": [
              "snapping_id"
            ],
            "key": "snapping_id",
            "used_key_parts": [
              "snapping_id"
            ],
            "key_length": "4",
            "ref": [
              "goimagine.bm_snapping.snapping_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 53,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "13.25",
              "eval_cost": "5.30",
              "prefix_cost": "59.16",
              "data_read_per_join": "6K"
            },
            "used_columns": [
              "snapping_id",
              "object_ids",
              "object_type"
            ],
            "attached_condition": "<if>(is_not_null_compl(bm_block_statuses), ((`goimagine`.`bm_snapping`.`snapping_id` = `goimagine`.`bm_block_statuses`.`snapping_id`) and (`goimagine`.`bm_block_statuses`.`object_type` like 'pages')), true)"
          }
        },
        {
          "table": {
            "table_name": "bm_blocks",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "block_id"
            ],
            "key_length": "4",
            "ref": [
              "goimagine.bm_snapping.block_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 53,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "13.25",
              "eval_cost": "5.30",
              "prefix_cost": "77.71",
              "data_read_per_join": "11K"
            },
            "used_columns": [
              "block_id",
              "type",
              "properties",
              "company_id",
              "storefront_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "bm_blocks_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "block_id",
              "lang_code"
            ],
            "key_length": "10",
            "ref": [
              "goimagine.bm_snapping.block_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 53,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "13.25",
              "eval_cost": "5.30",
              "prefix_cost": "96.26",
              "data_read_per_join": "10K"
            },
            "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": [
              "goimagine.bm_snapping.block_id",
              "const",
              "goimagine.bm_blocks_descriptions.lang_code",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 53,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "22.08",
              "eval_cost": "5.30",
              "prefix_cost": "123.64",
              "data_read_per_join": "11K"
            },
            "used_columns": [
              "snapping_id",
              "object_id",
              "object_type",
              "block_id",
              "lang_code",
              "content"
            ],
            "attached_condition": "<if>(is_not_null_compl(default_content), (`goimagine`.`default_content`.`object_type` like ''), true)"
          }
        },
        {
          "table": {
            "table_name": "dynamic_object_content",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "block_id"
            ],
            "key_length": "4",
            "ref": [
              "goimagine.bm_snapping.block_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 63,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "22.08",
              "eval_cost": "6.37",
              "prefix_cost": "152.10",
              "data_read_per_join": "13K"
            },
            "used_columns": [
              "snapping_id",
              "object_id",
              "object_type",
              "block_id",
              "lang_code",
              "content"
            ],
            "attached_condition": "<if>(is_not_null_compl(dynamic_object_content), ((`goimagine`.`dynamic_object_content`.`object_id` = 105) and (`goimagine`.`dynamic_object_content`.`lang_code` = `goimagine`.`bm_blocks_descriptions`.`lang_code`) and (`goimagine`.`dynamic_object_content`.`object_type` like 'pages')), true)"
          }
        }
      ]
    }
  }
}

Result

grid_id block_id content object_id object_type object_ids snapping_id wrapper user_class order status display_on type properties company_id storefront_id lang_code name
157 5 0 995 0 A M template a:1:{s:8:"template";s:71:"addons/ath_custom__goimagine_com/blocks/static_templates/smart_logo.tpl";} 0 1 en Logo
158 7 0 591 th_top-search 0 D M template a:1:{s:8:"template";s:68:"addons/algolia/blocks/static_templates/algolia_search_with_state.tpl";} 0 1 en Search
159 62 0 176 th_cart-content 0 A M 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:5:"thumb";} 0 1 en Cart content
160 76 a:1:{s:4:"menu";s:1:"2";} 0 179 tt_header-menu hidden-phone 0 A M menu a:3:{s:8:"template";s:35:"blocks/menu/dropdown_horizontal.tpl";s:30:"dropdown_second_level_elements";s:1:"5";s:29:"dropdown_third_level_elements";s:1:"5";} 0 1 en Menu
165 77 a:1:{s:7:"content";s:574:" <strong><a href="https://goimagine.com/vendor.php"><span style="color: rgb(0, 115, 119);">Seller Dashboard</a></li></strong> <li class="ty-footer-menu__item"><a href="{"pages.view?page_id=95"|fn_url}">Become a Member</a></li> <li class="ty-footer-menu__item"><a href="http://help.goimagine.com/">Seller Help Center</a> <li class="ty-footer-menu__item"><a href="{"pages.view?page_id=29"|fn_url}">Handmade Guidelines</a></li> <li class="ty-footer-menu__item"><a href="{"pages.view?page_id=54"|fn_url}">Copyright Infringement</a></li> ";} 0 182 blocks/wrappers/footer_general.tpl footer-no-wysiwyg 0 A M smarty_block a:1:{s:8:"template";s:23:"blocks/smarty_block.tpl";} 0 1 en Sell
164 78 0 183 blocks/wrappers/footer_general.tpl 0 A E template a:1:{s:8:"template";s:53:"blocks/static_templates/my_account_links_advanced.tpl";} 0 1 en Shop
166 79 a:1:{s:4:"menu";s:1:"3";} 0 184 blocks/wrappers/footer_general.tpl footer-menu-shop 0 A M menu a:2:{s:8:"template";s:26:"blocks/menu/text_links.tpl";s:18:"show_items_in_line";s:1:"N";} 0 1 en Company
169 82 a:1:{s:7:"content";s:307:"{** block-description:tmpl_copyright **} <p class="bottom-copyright">&copy; 2022 goimagine - <a href="{"pages.view?page_id=5"|fn_url}">Terms & Conditions</a> - <a href="{"pages.view?page_id=3"|fn_url}">Privacy Policy</a> - <a href="{"pages.view?page_id=43"|fn_url}">Buyer & Returns Policy</a></li> </p>";} 0 187 0 A M smarty_block a:1:{s:8:"template";s:23:"blocks/smarty_block.tpl";} 0 1 en Copyright Text
888 116 a:1:{s:7:"content";s:29:"<p><br></p> <p></p> <p></p>";} 0 1537 hidden-phone 0 A E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Blank
889 173 a:1:{s:7:"content";s:87:"<p><img src="https://d1q8o8ch5u48ua.cloudfront.net/images/blank.png?1589491226167"></p>";} 0 1542 hidden-phone 0 D E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Blank Big Block
165 265 0 1038 blocks/wrappers/footer_general.tpl 0 A V template a:1:{s:8:"template";s:73:"addons/ath_custom__goimagine_com/blocks/static_templates/about_vendor.tpl";} 0 1 en About Us
683 271 a:1:{s:4:"menu";s:1:"5";} 0 1049 0 A V vendor_top_menu a:1:{s:8:"template";s:59:"addons/ath_custom__goimagine_com/blocks/vendor_top_menu.tpl";} 0 1 en Vendor Top Menu
753 310 a:1:{s:4:"menu";s:1:"5";} 0 1225 0 A V vendor_top_menu a:1:{s:8:"template";s:70:"addons/ath_custom__goimagine_com/blocks/vendor_top_menu_horizontal.tpl";} 0 1 en MOSAIC Horizontal Menu
792 381 a:1:{s:7:"content";s:363:"{** block-description:tmpl_copyright **} <p class="bottom-copyright">Copyright &copy; 2022 - Powered by <a href="https://goimagine.com">goimagine - <a href="{"pages.view?page_id=5"|fn_url}">Terms & Conditions</a> - <a href="{"pages.view?page_id=3"|fn_url}">Privacy Policy</a> - <a href="{"pages.view?page_id=43"|fn_url}">Buyer & Returns Policy</a></li> </p>";} 0 1334 0 A V smarty_block a:1:{s:8:"template";s:23:"blocks/smarty_block.tpl";} 0 1 en MOSAIC Copyright Footer
879 487 a:1:{s:7:"content";s:328:"<h4><strong>At goimagine, our focus is to help children in need through handmade. As we grow and have the ability to increase our monetary donations, we hope to continue adding charity partners throughout the USA. We are proud to support the following organizations:</strong></h4> <h3><br></h3> <h4></h4> <h4></h4> <h4></h4>";} 0 1524 0 A E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Intro
878 488 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:4:"9659";}} 0 1525 hidden-phone 0 A E banners a:1:{s:8:"template";s:34:"addons/banners/blocks/original.tpl";} 0 1 en DESKTOP- Charity Partner Banner
167 589 a:1:{s:7:"content";s:39:"<div class="klaviyo-form-U2gJU9"></div>";} 0 1676 0 A M html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Footer Subscribe
156 640 a:1:{s:7:"content";s:86:"={$company.discussion.average_rating|fn_print_r} <=> {$company_data.average_rating}= ";} 0 2200 0 D E smarty_block a:1:{s:8:"template";s:23:"blocks/smarty_block.tpl";} 0 1 en Test Var
159 4 0 177 blocks/wrappers/onclick_dropdown.tpl th_your-account 1 A M my_account a:1:{s:8:"template";s:21:"blocks/my_account.tpl";} 0 1 en My Account
158 52 0 2201 1 D E vendor_search a:1:{s:8:"template";s:32:"blocks/vendors/vendor_search.tpl";} 0 1 en Search
167 80 a:1:{s:7:"content";s:490:"<div class="th_social-link facebook"> <a href="https://www.facebook.com/goimagine.life/" target="_blank"><i class="icon-tt-facebook-squared"></i></a> </div> <div class="th_social-link instagram"> <a href="https://www.instagram.com/goimagine.life/" target="_blank"><i class="icon-tt-instagram"></i></a> </div> <div class="th_social-link youtube"> <a href="https://www.youtube.com/channel/UCvSZ1ZH5gpsoVNvGZnj2xkQ" target="_blank"><i class="icon-tt-youtube-play"></i></a> </div>";} 0 185 blocks/wrappers/footer_general.tpl th_footer__social-link 1 D M smarty_block a:1:{s:8:"template";s:23:"blocks/smarty_block.tpl";} 0 1 en Connect with us
879 116 a:1:{s:7:"content";s:29:"<p><br></p> <p></p> <p></p>";} 0 1539 hidden-tablet hidden-desktop 1 D E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Blank
166 243 0 999 blocks/wrappers/footer_general.tpl 1 A V vendor_social_icon a:1:{s:8:"template";s:62:"addons/ath_custom__goimagine_com/blocks/vendor_social_icon.tpl";} 0 1 en Connect with Us
683 246 0 1003 1 A V vendor_search a:1:{s:8:"template";s:71:"addons/ath_custom__goimagine_com/blocks/vendors/vendor_search_slide.tpl";} 0 1 en Search this Shop - MOSAIC
878 489 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:4:"9660";}} 0 1526 hidden-desktop hidden-tablet 1 A E banners a:1:{s:8:"template";s:34:"addons/banners/blocks/original.tpl";} 0 1 en MOBILE- Charity Partner Banner
889 498 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:4:"9665";}} 0 1540 hidden-phone 1 A E banners a:1:{s:8:"template";s:34:"addons/banners/blocks/original.tpl";} 0 1 en Desktop - Make a Difference
683 51 0 1048 2 A V vendor_logo a:2:{s:8:"template";s:30:"blocks/vendors/vendor_logo.tpl";s:12:"image_height";s:3:"100";} 0 1 en Vendor logo
160 75 a:1:{s:4:"menu";s:1:"2";} 0 1045 hidden-tablet hidden-desktop 2 A M mega_menu a:6:{s:8:"template";s:30:"blocks/mega_menu/mega_menu.tpl";s:8:"language";s:1:"N";s:8:"currency";s:1:"N";s:12:"full_tree_l1";s:1:"8";s:12:"full_tree_l2";s:1:"6";s:12:"full_tree_l3";s:1:"6";} 0 1 en MegaMenu
878 116 a:1:{s:7:"content";s:29:"<p><br></p> <p></p> <p></p>";} 0 1535 hidden-phone 2 D E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Blank
167 244 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:4:"9477";}} 0 1000 hidden-phone 2 D V banners a:1:{s:8:"template";s:34:"addons/banners/blocks/original.tpl";} 0 1 en MOSAIC Footer Logo
156 263 0 1035 2 A V template a:1:{s:8:"template";s:78:"addons/ath_custom__goimagine_com/blocks/static_templates/shop_announcement.tpl";} 0 1 en Shop Announcement
880 490 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:4:"9661";}} 0 1527 2 A E banners a:1:{s:8:"template";s:34:"addons/banners/blocks/original.tpl";} 0 1 en Partner Banner 1
881 491 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:4:"9662";}} 0 1528 2 A E banners a:1:{s:8:"template";s:34:"addons/banners/blocks/original.tpl";} 0 1 en Partner Banner 2
886 492 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:4:"9663";}} 0 1529 2 A E banners a:1:{s:8:"template";s:34:"addons/banners/blocks/original.tpl";} 0 1 en Partner Banner 3
887 493 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:4:"9664";}} 0 1530 2 A E banners a:1:{s:8:"template";s:34:"addons/banners/blocks/original.tpl";} 0 1 en Partner Banner 4
889 499 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:4:"9666";}} 0 1541 hidden-tablet hidden-desktop 2 A E banners a:1:{s:8:"template";s:34:"addons/banners/blocks/original.tpl";} 0 1 en MOBILE - Make a Difference
158 593 0 2279 2 A E template a:1:{s:8:"template";s:34:"blocks/static_templates/search.tpl";} 0 1 en Search
889 116 a:1:{s:7:"content";s:29:"<p><br></p> <p></p> <p></p>";} 0 1543 3 A E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Blank
167 116 a:1:{s:7:"content";s:29:"<p><br></p> <p></p> <p></p>";} 0 1069 3 D V html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Blank
880 494 a:1:{s:7:"content";s:547:"<h4>Horizons for Homeless Children</h4> <p>The mission of Horizons for Homeless Children is to improve the lives of young homeless children in Massachusetts and help their families succeed by providing high-quality early education, opportunities for play, and comprehensive family support services. Every homeless child will have the opportunity to learn, play, and most importantly thrive.</p> <p><a href="https://horizonschildren.org/" target="_blank"><strong><span style="color: rgb(0, 115, 119);">Learn More.</span></strong></a></p> <p></p>";} 0 1531 3 A E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Partner Info 1
881 495 a:1:{s:7:"content";s:588:"<h4>Relief Nursery</h4> <p>Relief Nursery prevents the cycle of child abuse and neglect through early intervention that focuses on building successful and resilient children, strengthening parents, and preserving families.&nbsp;At the core of Relief Nursery is the belief in focusing on, and building upon, the strength of each individual family.</p> <p><strong><a href="https://reliefnursery.org/" target="_blank"><span style="color: rgb(0, 115, 119);">Learn More.<br><br></span></a></strong></p> <p><span style="color: rgb(0, 115, 119);"><strong><strong></strong></strong></span></p>";} 0 1532 3 A E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Partner Info 2
886 496 a:1:{s:7:"content";s:548:"<h4>The Shine Initiative</h4> <p>Shine Initiative educates youth and young adults on mental health issues, provides local resources for professional treatment and works to remove the stigma associated with these common illnesses.&nbsp;Working with schools and communities to show that youth voices truly matter&nbsp;in the effort to make mental health a mainstream topic.</p> <p><strong></strong><a href="https://www.shineinitiative.org/" target="_blank"><span style="color: rgb(0, 115, 119);"><strong>Learn More.</strong></span></a></p> <p></p>";} 0 1533 3 A E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Partner Info 3
887 497 a:1:{s:7:"content";s:602:"<h4>Curious Learning</h4> <p>600 million children in the world today will not learn to read&mdash; the 2020 pandemic could double that number. Knowing how to read is the single best way to end the cycle of poverty. Curious Learning works with partners to curate, localize, & distribute free open source apps that empowers everyone to have the opportunity to learn to read.&nbsp;</p> <p><a href="https://www.curiouslearning.org/" target="_blank"><strong><span style="color: rgb(0, 115, 119);">Learn More.</span></strong></a></p> <p><span style="color: rgb(49, 133, 155);"><strong></strong></span></p>";} 0 1534 3 A E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Partner Info 4
683 4 0 1047 blocks/wrappers/onclick_dropdown.tpl 4 A V my_account a:1:{s:8:"template";s:21:"blocks/my_account.tpl";} 0 1 en My Account
167 276 a:1:{s:5:"items";a:2:{s:7:"filling";s:8:"manually";s:8:"item_ids";s:4:"9500";}} 0 1066 hidden-tablet hidden-desktop 4 D V banners a:1:{s:8:"template";s:34:"addons/banners/blocks/original.tpl";} 0 1 en Powered By - Mobile
889 500 a:1:{s:7:"content";s:695:"<p>Our focus at goimagine is to support charities making an impact on the lives of children. We feel strongly that every child deserves a chance to be their best possible self. All charities we work with are vetted by our team to ensure their mission aligns with ours. Do you know of a charity that could benefit from our support?&nbsp;We would love to hear from you!&nbsp;<br></p> <p>&nbsp; &nbsp; &nbsp; &nbsp;<a href="https://goimagine.com/charity-suggestion-form/" target="_blank"><img src="https://d1q8o8ch5u48ua.cloudfront.net/images/Submit_Charity_Button.png?1664985774304" style="width: 153px; height: 71px;" width="153" height="71"></a><br></p> <p><br></p> <p><br></p> <p>&nbsp;</p>";} 0 1544 4 A E html_block a:1:{s:8:"template";s:21:"blocks/html_block.tpl";} 0 1 en Charity Suggestions
683 62 0 1046 5 A V 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:5:"thumb";} 0 1 en Cart content