DB Search is taking too much time

Hi All,

The DB search is taking too much time. I am creating a string and using the same to find the documents in another database. The search is taking too much time. I am using below code for doing the search.

Set colPVDoc = dbPV.Search(strKey$ ,dtSearch,0)

The above line of code is taking too much time for getting the documents. The strKey$ value is something like this:

strKey$ = “(Form = {PkgSpecSub} ) & (Type ={Flex})& (SalesClass ={009})& (compOzWt = {7.5000})& (Flavor ={Blue Corn})& (Shape ={Astroids})”

dtSearch is define as

Dim dtSearch As New notesdatetime(“01/01/1900”)

Any idea what I am doing wrong or any other method which can give the result fast.

Thanks so much in advance

L T

Subject: search

Not sure whether it would speed it up, but use Nothing instead of a date in the search parameters, you’re obviously just trying to return everything so no need to specify a date.

In general though, search will be slow(ish) on large databases. If you can change it to an ftsearch that would be quicker (assuming your other database is full text indexed)