I had recommended to a developer that we should not longer be using a view alias when we do a db.getView(“”), since I had read an article that said this was slower. The article had also stated that using the alias was easier to maintain, it was just a little slower to open the view. The other developer had stated that Lotus/IBM said that you should always open the view with an alias since it was faster.
Does anybody have input on what we should be doing?
Cheers and thanks,
John
Subject: Probably trivial
IMHO I would opt for ease of maintaining (with alias) vs. the minimal impact on performance. What you should be concerned about is how you traverse the view… there are several developerworks articles on the best approaches as well. I believe there is also an IBM Redbook on Performance of Domino Applications. That mentions things like using:
item.getItemValue(“field”)(0) vs. item.field and comparing integers vs. strings:
if ( item.getItemValue(“field”)(0) = “” ) then
vs.
if ( len(trim(item.getItemValue(“field”)(0))) = 0 ) then
and lots of other stuff.
Subject: Thanks
I would agree on how you process the view, however it just seemed to me odd the IBM would say the using an alias is faster, and yet the person who wrote the article would say it is slower. I am may be posting yet another question about view performance vs doing a search on an un-indexed. I may look to see if I can get an email address for the person who said the view name is faster.
Cheers,
John