我有以下查询,但它在我的sql editor
! 如何增强它(明智地编写)以加快查询运行速度。
SELECT year,main_code,name,father_code,main_code || '__' || year AS main_id,
(SELECT COUNT(*) FROM GK_main
WHERE father_code=sc.main_code AND
year= (SELECT MAX(year)FROM SS_job)) childcount
FROM GK_main sc WHERE year=(SELECT MAX(year)FROM SS_job)