I want to implement a search function on any field of Elmah errors, beside using full text search on AllXml field(it is relative difficult to setup), is there any way to let the search fast? My site has a lot of traffic, and generat a lot of errors per minute.
ps, if I use full text search, as I see there are a lot of new errors generated, can I searched new errors in time?
It’s almost guaranteed that full-text searching is going to be the fastest way to search the data, especially since Elmah stores the XML in an
ntextfield. Your only other option would be to do a text search usingLIKE(slower and more limited than full-text), or to convert thentextfield into an xml data type every time you need to do a search. Depending on the number of errors you’re searching over, that could be a very costly process.The only downside to a full-text solution is that you run the risk of false positives if the search term matches to an XML item’s definition (such as searching on the word “item” or “value”). As to your question about whether you’d be able to search errors in real-time, that would depend on your database platform. SQL Server can be configured in a number of ways to give you nearly real-time full text searching capabilities (see http://technet.microsoft.com/en-us/library/ms142575.aspx).