此查询中的哪些列可能会优化处理?
select vintage, wine_no, wname, pctalc, grade, price, wine.vid,
vname, wine.cid, cname
from vineyard, class, wine
where wine.vid = vineyard.vid
and wine.cid = class.cid
and wine.cid = 'SHIRAZ' and grade = 'A' ;
是否需要考虑在包括连接在内的此类表上创建索引?如果我在vid上创建索引(wine table的外键),它会优化性能吗?对于wine.vid = vineyard.vid,查询正在执行全表访问,这会给它增加高成本吗? 有人可以建议我一些选择吗?