Q
qutwah
Unregistered / Unconfirmed
GUEST, unregistred user!
有四个表<br>表1:<br> Autoid integer identity(1,1) Primary Key,<br> Employeeid Integer;<br> OldDepartmentid integer<br> OldJobid integer<br>表2:<br> Autoid integer identity(1,1) Primary Key,<br> EmployNo VarChar(10), <br> EmployName varchar(10) <br>表3:<br> Autoid integer identity(1,1) Primary Key,<br> DepartmentName varchar(20)<br>表4<br> Autoid integer identity(1,1) Primary Key,<br> Job varchar(20);<br>通过这四个表,我想查询得出一个表:<br> Autoid,EmployeeNo,EmployName,DepartmentName,Job(通过表1的Employeeid与表2的Autoid关联,表1的OldDepartmentid与表3的Autoid关联,表1的OldJobid与表4的Autoid关联,返回结果为所有表1的记录),如果使用left Join的话,涉及到多表关联查询,当记录较多时,可能速度很慢,如果使用查询字段的话,速度也很慢,有没有可能提高速度的最好办法?