Query time 0.00103
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "2.24"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_pages",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"parent_id"
],
"key": "parent_id",
"used_key_parts": [
"parent_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 9,
"rows_produced_per_join": 0,
"filtered": "4.35",
"cost_info": {
"read_cost": "0.57",
"eval_cost": "0.04",
"prefix_cost": "1.48",
"data_read_per_join": "1K"
},
"used_columns": [
"page_id",
"parent_id",
"status",
"page_type",
"timestamp",
"usergroup_ids",
"use_avail_period",
"avail_from_timestamp",
"avail_till_timestamp"
],
"attached_condition": "((`zdrowy_db`.`cscart_pages`.`status` = 'A') and (`zdrowy_db`.`cscart_pages`.`page_type` = 'B') and ((`zdrowy_db`.`cscart_pages`.`usergroup_ids` = '') or (0 <> find_in_set(0,`zdrowy_db`.`cscart_pages`.`usergroup_ids`)) or (0 <> find_in_set(1,`zdrowy_db`.`cscart_pages`.`usergroup_ids`))) and ((`zdrowy_db`.`cscart_pages`.`use_avail_period` = 'N') or ((`zdrowy_db`.`cscart_pages`.`use_avail_period` = 'Y') and (`zdrowy_db`.`cscart_pages`.`avail_from_timestamp` <= 1774755576) and ((`zdrowy_db`.`cscart_pages`.`avail_till_timestamp` >= 1774755576) or (`zdrowy_db`.`cscart_pages`.`avail_till_timestamp` = 0)))))"
}
},
{
"table": {
"table_name": "cscart_page_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"page_id",
"lang_code"
],
"key_length": "9",
"ref": [
"zdrowy_db.cscart_pages.page_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.10",
"eval_cost": "0.04",
"prefix_cost": "1.61",
"data_read_per_join": "1K"
},
"used_columns": [
"page_id",
"lang_code"
]
}
},
{
"table": {
"table_name": "cscart_ult_objects_sharing",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"share_object_id",
"share_company_id",
"share_object_type"
],
"key_length": "159",
"ref": [
"zdrowy_db.cscart_pages.page_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.10",
"eval_cost": "0.04",
"prefix_cost": "1.75",
"data_read_per_join": "62"
},
"used_columns": [
"share_company_id",
"share_object_id",
"share_object_type"
],
"attached_condition": "(`zdrowy_db`.`cscart_ult_objects_sharing`.`share_object_id` = `zdrowy_db`.`cscart_pages`.`page_id`)"
}
},
{
"table": {
"table_name": "cscart_seo_names",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"dispatch"
],
"key": "PRIMARY",
"used_key_parts": [
"object_id",
"type",
"dispatch",
"lang_code"
],
"key_length": "206",
"ref": [
"zdrowy_db.cscart_pages.page_id",
"const",
"const",
"const"
],
"rows_examined_per_scan": 6,
"rows_produced_per_join": 2,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.26",
"eval_cost": "0.23",
"prefix_cost": "2.24",
"data_read_per_join": "3K"
},
"used_columns": [
"object_id",
"type",
"dispatch",
"lang_code"
]
}
}
]
}
}
Result
| COUNT(DISTINCT(cscart_pages.page_id)) |
| 5 |