我在理解Performance Tuning之前的查询时遇到了麻烦。下面是我试图通过添加索引来改进的查询。
select year || ' ' || cn.model as model, mpg || '-' || cylinders || '-' || horsepower as Specs
from car_names cn, car_details cd
where cn.id = cd.id and cn.model
in (select model from model_details where maker
in (select id from car_makers where country
in (select countryid from countries where countryname = 'germany')))
order by year
以下是脚本文件的链接:https://docs.google.com/document/d/1vClWrxZnU3AKhQzeWwqbMtf5du-3EcfHTuLdbgGvxU4/edit?usp=sharing