Query time 0.00032
JSON explain
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "storefronts_promotions",
"access_type": "system",
"possible_keys": ["PRIMARY", "idx_storefront_id"],
"rows": 0,
"filtered": 0,
"const_row_not_found": true
},
"read_sorted_file": {
"filesort": {
"sort_key": "if(cscart_promotions.from_date > 1741888641,1,0) + if(cscart_promotions.to_date <> 0 and cscart_promotions.to_date < 1741888641,2,0), abs(if(cscart_promotions.from_date > 1741888641,cscart_promotions.from_date,cscart_promotions.to_date) / -1 + 1741888641)",
"table": {
"table_name": "cscart_promotions",
"access_type": "ALL",
"possible_keys": ["PRIMARY"],
"rows": 7,
"filtered": 100,
"attached_condition": "cscart_promotions.`status` = 'A' and cscart_promotions.company_id <> 0 and cscart_promotions.promotion_id not in (25,26,27)"
}
}
},
"table": {
"table_name": "cscart_promotion_images",
"access_type": "eq_ref",
"possible_keys": ["promo"],
"key": "promo",
"key_length": "10",
"used_key_parts": ["promotion_id", "lang_code"],
"ref": ["fluentmart_cscart.cscart_promotions.promotion_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cscart_promotion_images.promotion_id = cscart_promotions.promotion_id and cscart_promotion_images.lang_code = 'en')"
},
"table": {
"table_name": "cscart_promotion_descriptions",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["promotion_id", "lang_code"],
"ref": ["fluentmart_cscart.cscart_promotions.promotion_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cscart_promotion_descriptions.lang_code = 'en')"
}
}
}