Re: Update Performance
From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 01/10/05
- Next message: Louis Davidson: "Re: Help with Select statement"
- Previous message: David Gugick: "Re: Update Performance"
- In reply to: Brian Linden: "Update Performance"
- Next in thread: Brian Linden: "Re: Update Performance"
- Reply: Brian Linden: "Re: Update Performance"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 Jan 2005 15:23:04 -0500
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. > >
- Next message: Louis Davidson: "Re: Help with Select statement"
- Previous message: David Gugick: "Re: Update Performance"
- In reply to: Brian Linden: "Update Performance"
- Next in thread: Brian Linden: "Re: Update Performance"
- Reply: Brian Linden: "Re: Update Performance"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|