I have a view that I am running through Management Studio in the query widow. I am selecting 1000 records. When I run it, the tempdb table grows very quickly and the query takes several minutes to run. Tempdb can go from 1 mb to 1 gb in a few minutes. The query uses COUNT(*) , GROUP BY and HAVING. All tables (6) are indexed and I reoganized all of the indexes while testing. A web page that calls the view runs with no affect on tempdb. No other views in this database have the problem. Any idea why this would happen?
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.