如何建立有效的索引? HisTAAmountLog201306:该表ID为自增,作为主键
SELECT t1.isValid, t1.MID,t1.ExecuteDate, t1.ExecuteType,
t1.Amount, t1.RelationMID,t1.RelationTicket, t1.Balance,
t1.Remark, t1.LoginID,t1.UID, OperatorInfo.LoginID AS OperatorName,
t1.OperatorID, t1.TradeDate,t1.TradeStartDate, t1.TradeEndDate,
t1.Id, dbo.Customer.CustomerName
FROM HisTAAmountLog201306 as t1 INNER JOIN
dbo.Customer AS OperatorInfo ON
t1.OperatorID = OperatorInfo.UID INNER JOIN
dbo.Customer ON t1.UID = dbo.Customer.UID
INNER JOIN taprop t2 ON t1.MID=t2.MID
WHERE ( OperatorInfo.customertype = '1' or Customer.CustomerType='1')
and TradeDate >= '2013-06-04' and TradeDate <= '2013-06-04'
order by Mid, ID