Re: Update Performance

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Brian Linden (brian_at_ineedadip.com)
Date: 01/10/05


Date: Mon, 10 Jan 2005 12:52:51 -0800

That is what I was originally doing, but as we are starting to farm out our
web servers, we are going to need to store it in the DB.

"Andrew J. Kelly" <sqlmvpnooospam@shadhawk.com> wrote in message
news:eAbm2I19EHA.1452@TK2MSFTNGP11.phx.gbl...
> Even if it is the only row in the table you should add a Clustered index
on
> [ID]. Make sure that you are not getting high disk queues for the drive
> that your transaction log file is on. If you are and the log file is not
on
> it's own Raid 1 you should move it. You might also want to think about
> caching this counter in the web server. That way you can increment the
> counter without hitting the bak end and only do the update to the db once
> every x hits.
>
> --
> Andrew J. Kelly SQL MVP
>
>
> "Brian Linden" <brian@ineedadip.com> wrote in message
> news:%23cw%235C19EHA.2608@TK2MSFTNGP10.phx.gbl...
> >I have a stored procedure that is executed on every web request that we
> >get.
> > On the web server, I get about 50 Requests a second.
> >
> > After looking into the bad performance I narrowed it down to my update
> > statement in my stored proc:
> > Update tblStats set counter = counter + 1 Where id = @id
> >
> > If I comment out this line, I get about 350 Requests a second.
> > That is the kind of performance that I need.
> >
> > It is crucial that I keep a real-time counter for business logic
purposes.
> >
> > I don't have any indexes on the table that I am updating.
> > Does anyone have any suggestions on what I can do to speed things up?
> >
> > Any suggestions would be appreciated.
> >
> >
>
>



Relevant Pages