And '20191130'
And the substring (newcomcode, 1, 4)='3209'
And kindcode in (' R10 ', 'R91', 'R92')
And the substring (classescode, 1, 1) in (' D ') group by 1;
Summary data is very slow, a month to run six hours, don't know where is wrong, how to modify, thank you for the teacher for help,
CodePudding user response:
A month data? If more, you may need to partition table to solve this problem, if less, you may lack of a proper index,CodePudding user response:
Sounds goodCodePudding user response:
Between the and into greater than, less than a try, time indexed, should be faster