Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Nothing wrong really, but you ask for efficiency and speed, and anything counts... You use: AND ((date + 1 YEAR) < (CURRENT_DATE + 240 DAYS))Let's see the algoritm. For each record you sum 365 to date and remember this number, then you sum 240 to current date and save this to a new var somewhere in the memory, then you compare both numbers I'm suggesting this instead: AND ((date + 125 DAYS) < CURRENT_DATE)Now for each record you sum 125 to date and compare this with current date. You are creating a new var, not two. Thus you need less memory and is also a little less demanding operation for the CPU. Nothing to care for when you have a few sums but in this context could suppose one advantage In reply to Re^5: For a better efficiency and speed question!
by pvaldes
|
|