Expression is as follows: the date (FSRQ) in (date (' 2017/2/1), date (' 2017/2/12)), and so on, have the optimized solutions
CodePudding user response:
Date (' 2017/2/1) the function of the transfer string date type, time consuming,Can consider to string (FSRQ, 'yyyy/mm/dd) in (' 2017/02/01', '2017/02/12),
CodePudding user response:
Look at your expression is the date (FSRQ), the FSRQ should be character type, you can directly use theFSRQ in (' 2017/02/01 ', '2017/02/12) pay attention to your FSRQ deposit date format, should be consistent with the expression, in this way, efficiency can be higher
But suggest you don't put all the data retrieved, use SQL directly in the where condition, efficiency will be higher than taking out all of the data to filter some