in reply to Re^4: For a better efficiency and speed question!
in thread For a better efficiency and speed question!
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: For a better efficiency and speed question!
by pvaldes (Chaplain) on Oct 04, 2011 at 18:17 UTC | |
by Anonymous Monk on Oct 04, 2011 at 21:09 UTC | |
by pvaldes (Chaplain) on Oct 04, 2011 at 21:41 UTC | |
by Anonymous Monk on Oct 04, 2011 at 23:23 UTC |