I don't have the trace here, but yes, I'm pretty sure.

Actually, I was updating the byte[] from 3 bytes to 8MB, so the dirty
check should be pretty fast because of the different lengths.

On Fri, Sep 24, 2010 at 6:45 PM, Fabio Maulo <[email protected]> wrote:
> are you sure that the performance issue is at ExecuteNonQuery ?
> I'm more inclined to think that it is somewhere else as, for example, in the
> dirty-check because NH will compare byte-per-byte until a difference is
> found.
>
> On Fri, Sep 24, 2010 at 9:12 AM, Juanma <[email protected]> wrote:
>>
>> Hi,
>>
>> I have a simple entity which contains a byte[] property. I need to map
>> that property to a varbinary(max) column in SQL Server, but I'm
>> getting very poor perfomance.
>>
>> For 8MB of data, NH is spending more than 30 seconds, while the same
>> operation with raw ADO.NET takes less than 2 seconds.
>>
>> After profiling the NH app with dotTrace, I can see that the most
>> expensive operation is SqlCommand.ExecuteNonQuery, but I don't
>> understand why the same ExecuteNonQuery is taking above 30 seconds
>> with NH and 2 seconds with ADONET.
>>
>> I've checked with the debugger and the SqlCommand executed by NH looks
>> the same than the one I'm executing with raw ADO.NET (same
>> CommandText, Parameters, Parameter Types, Parameter Values, etc.)
>>
>> Any idea?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>
>
>
> --
> Fabio Maulo
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to