Goofy little bug, accidentally found

posted by Jeff | Wednesday, August 19, 2009, 9:57 PM | comments: 0

As CoasterBuzz and PointBuzz have seen a significant spike in traffic the last few weeks, I was starting to get some performance weirdness. So among other things, I started doing SQL traces to see what was going on. Turns out that I somehow missed creating an index on a particular table when I last relaunched the site. Not sure that's the biggest issue, but whatever.

I accidentally landed on a line in the trace output that just struck me as wrong. There was a call to delete from the session table where SessionID < @SessionID. You probably don't need to know my code to know that should probably be SessionID = @SessionID. As these are random numbers, it was deleting big bunches of sessions at a time. Duh!

At least the mystery of why the user count would go from 150 to 30 is solved. Not that it served any purpose other than being cosmetic, but at least now I know.


Comments

No comments yet.


Post your comment: