DatabaseTraceListener - any performance recommendations

Topics: Logging Application Block
Jul 29, 2010 at 5:38 PM

We are going to use DatabaseTraceListener of Logging Application Block for logging events to database. I am curious to know if there are any performance issues I should be considering or know of before going forward. We have a technical requirement that to improve performance the events should be cached on server and flushed to database only when threshold is reached. But I believe that we may not need cahching as enteprise library is already optimized for performance. Am I correct in this understanding?

 

Thanks

Jul 30, 2010 at 6:46 AM

I haven't encountered any report on performance issues when using the database trace listener.  what do you mean when you say "events should be cached on server"?

Anyway, if it helps to answer your question, the database trace listener uses DAAB.  I wouldn't deny that I've read other people saying/suspecting performance problems caused by DAAB but from personal experience, I haven't. 

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@Avanade.com

Jul 30, 2010 at 10:26 PM

Thanks Sarah for your reply. The proposed caching is to avoid multiple calls to database. So only when threshold is reached, for example 50 events, then all 50 events will be flushed to database.

Aug 2, 2010 at 3:11 AM

So if you are to apply this in the process of logging to the database, it would be some sort of buffered logging, am I right?  Using  your example, 50 log entries would be accumulated before actually writing it to the database?  If yes, the answer to your original question would be no, the database trace listener wasn't designed that way.  It performs writing to the database everytime a log entry is sent to it for logging.

 

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@Avanade.com