Hard to analyze the strange result, some advices please

I am using ANTS 3.0 to trace performance problem, I got the result like this
sc1.jpg

both ownerid and priority are just integer field in the table, and the table is indexed, not many records.
I don't understand why the 8.59 shows on the priority assign line, not other line.
45 calls need 8.59+2.89 are slow too, since the table is simple, and I use primary key to get record.

any idea?
thanks

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    My first thought may be that something is happening on the SQL Server, for instance a lock on the table or field. It may be useful to run SQL Server Profiler on the server to see what's going on with the SQL Server when your program runs.
  • I believe it is not that case. The table is only for reading here.
    Pretent there is lock on the table that causes it slow, but why the time only show on the priority assignment? I had tried to move the line below the siteid assignment, above it, below the last line, the time always show on the priority line. But as I said, priority is just an integer field , what could make it specially?
  • ok, I see it show on another line now, it seems it can not locate the exact line. Or maybe there is no exact line, just the record takes that time.
  • Hi,

    I suspect - and this is only really a guess - that what's happening is the first time you're accessing a field on that row, it's actually fetching the entire row back from the server, since it's generally the case that that isn't much more expensive than just fetching a single column. That means that your first column access takes a lot longer than the second one (which is already actually ready for use by that point).

    Hope that helps,
    Robert
    Robert Chipperfield
    Red Gate
Sign In or Register to comment.