Home > database >  Quick filtering data of type date
Quick filtering data of type date

Time:10-13

Have a datawindow grid format, now the date line (datetime) filter, the user select a date filter, large amount of data, just slow down
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 the

FSRQ 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
  • Related