Query time 0.00768
JSON explain
{
"query_block": {
"select_id": 1,
"const_condition": "1",
"nested_loop": [
{
"table": {
"table_name": "cscart_companies",
"access_type": "system",
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "absolute_rating",
"access_type": "system",
"possible_keys": ["PRIMARY"],
"rows": 0,
"filtered": 0,
"const_row_not_found": true
}
},
{
"table": {
"table_name": "cscart_discussion_posts",
"access_type": "system",
"possible_keys": ["thread_id", "thread_id_2"],
"rows": 0,
"filtered": 0,
"const_row_not_found": true
}
},
{
"table": {
"table_name": "cscart_discussion_rating",
"access_type": "system",
"possible_keys": ["PRIMARY", "thread_id"],
"rows": 0,
"filtered": 0,
"const_row_not_found": true
}
},
{
"table": {
"table_name": "cscart_seo_names",
"access_type": "ref",
"possible_keys": ["PRIMARY", "dispatch"],
"key": "PRIMARY",
"key_length": "206",
"used_key_parts": ["object_id", "type", "dispatch", "lang_code"],
"ref": ["const", "const", "const", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cscart_seo_names.object_id = 14 and cscart_seo_names.`type` = 'm' and cscart_seo_names.dispatch = '' and cscart_seo_names.lang_code = 'en')",
"using_index": true
}
},
{
"table": {
"table_name": "cscart_discussion",
"access_type": "eq_ref",
"possible_keys": ["object_id"],
"key": "object_id",
"key_length": "6",
"used_key_parts": ["object_id", "object_type"],
"ref": ["const", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cscart_discussion.object_id = 14 and cscart_discussion.object_type = 'M')"
}
}
]
}
}
Result
| COUNT(DISTINCT(cscart_companies.company_id)) |
| 1 |