我目前在选择中使用选择来检查表中是否存在数据:
select
a.id,
a.desc,
a.serial,
a.partno,
a.maintact,
a.lcnalc,
a.datedue,
a.intrem,
a.lifetype,
(select b.id from assets b where
(b.maintact = a.maintact) and
(b.aircraft_id = a.aircraft_id) and
(b.inittype = "STRT") and
(b.initlcnalc = a.lcnalc OR b.initlcnalc = "")) as parent
from assets a where aircraft_id = 6;
我想知道的是执行上述查询的更有效方法?