[Emerald] Help with VerifyMailUser

Brian Johnson ( (no email) )
Wed, 3 May 2000 15:52:00 -0500

This is my VerifyMailUser Stored Procedure. It seems to be extensively
slow. When I run the query it can take up to 3 seconds to complete. We
currently have 7000 MBR's and 8000 SA's in use.

CREATE PROCEDURE VerifyMailUser @username varchar(32), @domain varchar(32),
@esid integer AS
Select Login, Shell, Email, d.MailDomain,
CASE WHEN (ma.OverLimit > 0 AND ma.OverLimit > ma.Balance) OR DateAdd(Day,
(ma.Extension+ma.OverDue+1), maExpireDate) < GetDate()
ELSE sa.Password END AS Password, HomeDir