How bad is the performance hit when I do database.getDocumentByID versus getting a view then searching the view for the documentID. Shouldn’t it be faster to just go straight to the UNID if you have it? I only need to retrieve one item per view. Is the overhead of getting the view and searching it worth it?
Subject: Re: getDocumentByID versus looking up in a view
Shouldn’t it be faster to just go straight to the UNID if you have it?
Yes, assuming you need the NotesDocument object. However, if the information you want is available in the view index, it’s probably faster to locate the view entry and read data from the ColumnValues of the entry, as opposed to having to “crack open” the document note.
Subject: Thanks Andre
Thanks, That makes a lot of sense. In this case I need to alter values on the doc, so I’ll get it by UNID.