Hard to analyze the strange result, some advices please
wyx2000
Posts: 20
I am using ANTS 3.0 to trace performance problem, I got the result like this
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
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
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.
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?
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
Red Gate