Slide 36
Slide 36 text
Índices - Left most part
mysql> EXPLAIN FORMAT=JSON SELECT Name, Population FROM city WHERE CountryCode='BRA' AND Population > 1000000;
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "city",
"access_type": "range",
"possible_keys": [
"CountryCode"
],
"key": "CountryCode",
"used_key_parts": [
"CountryCode",
"Population"
],
"key_length": "7",
"rows": 13,
"filtered": 100,
"index_condition": "((`world`.`city`.`CountryCode` = 'BRA') and (`world`.`city`.`Population` > 1000000))"
}
}
}