Hi,

I have a an entity Query that has a lot of items Metadata in a
relation "one-to-many".
When I delete the Query, I want all its childs to be delete too, so I
set cascade to all-delete-orphan.

The items get deleted, but it takes a lot of time. The query can have
many items, lets say 95k items.
I checked out with the SQL Profiler to see what was going on, and I
saw that each Metadata Item is getting deleted one by one like:

exec sp_executesql N'DELETE FROM MyDatabase.dbo.[QueryMetadata] WHERE
Id = @p0',N'@p0 int',@p0=302401

This takes time, and produces a bad user experience. I would like to
hear out any recommendations.
Maybe is better if I delete the items with a sql sentence?

Thanks in advance for your help!

Dzy.-

-- 
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