We are seeing this SQL query in our DB and are unsure what is generating this, we have flat catalog index enabled so it should not be asking for this
select `e`.*, if(at_visibility.value_id > 0, at_visibility.value, at_visibility_default.value) as `visibility`, if(at_status.value_id > 0, at_status.value, at_status_default.value) as `status`, `cat_index`.`position` as `cat_index_position`, `at_inventory_in_stock`.`is_in_stock` as `inventory_in_stock` from `catalog_product_entity` as `e` inner join `catalog_product_entity_int` as `at_visibility_default` on (`at_visibility_default`.`entity_id` = `e`.`entity_id`) and (`at_visibility_default`.`attribute_id` = '102') and `at_visibility_default`.`store_id` = 0 left join `catalog_product_entity_int` as `at_visibility` on (`at_visibility`.`entity_id` = `e`.`entity_id`) and (`at_visibility`.`attribute_id` = '102') and (`at_visibility`.`store_id` = 1) inner join `catalog_product_entity_int` as `at_status_default` on (`at_status_default`.`entity_id` = `e`.`entity_id`) and (`at_status_default`.`attribute_id` = '96') and `at_status_default`.`store_id` = 0 left join `catalog_product_entity_int[...]
Anyone knows why is this and where is this being generated from?