Home Forums SQL Server 2008 SQL Server 2008 Performance Tuning Simple Select top x * Query Takes much too long RE: Simple Select top x * Query Takes much too long<!-- 864 --><!-- 864 --><!-- 864 --><!-- 864 -->

  • Thank you very much for your answer!

    This was right the way i needed to think!

    I spent over the last days a few hours by searching for fragmented Heaps like you suggested and it was quite right.

    Instead of creating a clustered index i've decieded to try an other approach and executed: Alter Table dbo.test REBUILD whicht did the job just like a clustered index would have!

    Now the table only consumes about 100 MB and all queries run fast again.

    To avoid this situation i've read that the table hint "with TABLOCK" takes care that the pages are deallocated after the delete-statement...?

    Would this be true if i decide to not use a clustered index?