New answers tagged

0

We had a similar issue with a query that was called from EntityFramework. Was fast in SSMS, but slow from application. It turned out there was an error in mapping of parameters, their type, which caused the query from application to do a scan, due to the query becomming non-SARGable. After fixing this issue, the query was fast from application.


1

I would keep the clustered index in-place especially if the data is being inserted in large lumps (rather than lots of individual inserts). You should drop the non-clustered indexes if rebuilding the data from scratch. NOTE: As per your mention of truncating, this answer is talking about rebuilding a table from scratch. Considerations would be different if ...


Top 50 recent answers are included