SELECT SUM (UcAmount) FROM memb_capitaldetail WHERE 1=1
='07 d81732 and UserId - be1b - 41 e2 - a7d4 - aad60161ee36'
SELECT count (UcAmount) FROM memb_capitaldetail WHERE 1=1
='07 d81732 and UserId - be1b - 41 e2 - a7d4 - aad60161ee36'
SELECT count (UserId) FROM memb_capitaldetail WHERE 1=1
='07 d81732 and UserId - be1b - 41 e2 - a7d4 - aad60161ee36'
AND InComeStatus=1
SELECT count (UserId) FROM memb_capitaldetail WHERE 1=1
='07 d81732 and UserId - be1b - 41 e2 - a7d4 - aad60161ee36'
I'm memb_capitaldetail give UserId indexed, but with expain found that only the last to leave the index, the other is a full table scan,
Excuse me, what reason is this?
thank you
CodePudding user response:
Table structure and explain all postedCodePudding user response: