When I remove 41 and 42 lines, Elapsed time is "00:00:03.13". The "com_site开发者_运维技巧" table aliased as [c] has no index or PK. Result records count is 5503(20 records before removing.) Could anyone explain me why this happens? Thanks...
Even though the alias [c] has no index, the conditions
c.site_gb LIKE 'A%'
c.up_dept_cd='A001'
can be processed first if [c] is small enough compared to the other tables. Processing this first would be preferable to processing the correlated 2-level sub-query involving the tuple (bank_cd, acct_no).
精彩评论