I have some documents that contain flight information(eg a flight from Paris to London today 22-05-2015).
I want to have 2 views: 1 for today and future flights and 1 for the past flights.
I could do these selections:
SELECT Form="flight" & fdate >= @Date(@Today)
SELECT Form="flight" & fdate < @Date(@Today)
Is it correct in terms of system performance? I see in domino designer that the view is refreshing every second. What is the best practise for this kind of selection?
Performance- wise it is a very bad idea to put @Today or @Now in a view selection formula.
There are some alternatives to do what you want to do:
In that case, the view indexer does not "know" that something changed. You need to update view index manually once every day using an updall command (program document:
load updall yourdatabase.nsf -T "YourTodayView"
Disadvantage: Nightly document changes after the agent run
Disadvantage: You have to take care for "newly created" documents in a special way.
Examples are taken from this IBM link. There is also a blog- entry dealing with this, and searching for lotus notes view selection @today
in google will give you a lot more results with examples and code.