I am using SQL server 2008R2 instance which is monitored by red-gate SQL monitor. Database mail process is taking more than 5 minutes to execute. It always come up in my long running query list.
Below is the sql fragment. I have no idea how to make it execute faster and where to tune it. Any direction will be much appreciated.
@NaveenK - Have you checked how many entries are in the
You can use the stored procedure
You run it like this:
@sent_status = 'sent' -- possible values = sent, unsent, retrying, failed
answered Oct 05 '11 at 01:04 AM
Check this out: http://www.red-gate.com/messageboard/viewtopic.php?t=8839
I believe it's functioning as expected. It looks to me like it's the database mail message queue handler. I did: SELECT count(*) FROM [msdb].[dbo].[sysmail_mailitems]
And i had 11360 items. When I looked at the storage size, it was about 5MB. Not that large considering it's a 1TB data warehouse.I would say ignore.
answered Jun 05 '13 at 01:20 PM