views:

263

answers:

1

I'm having some performance issues since a DB was moved from SQL2000 to SQL2008.

We need to retrieve from a SQL View for a mail merge and for an application called FORMIC.

It was fine under SQL 2000, but is now very, very slow. One thing I've noticed is that SQL Profiler shows that Excel does a simple "SELECT * FROM VIEW" where Word seems to do something far more complicated and is retrieving records with the cursor (which for 6,000+ rows ends up taking minutes to retrieve).

Does anyone have a way around this?

+1  A: 

Possible idea: do a two-step mail merge. Create a CSV dump of all interesting fields from the database, and then use that CSV file as a data source for Word. This way, you'll be sure that no extra queries are executed.

Another thing to try: use a live query monitor or packet sniffer and observe the actual SQL statements that are travelling on the wire.

Alex
Thanks Alex.The two-stage approach is where I'm heading. What I don't understand is why the client's SQL 2000 setup didn't have this problem.By live query monitor, do you mean SQL Profiler (I've run this already).
Tim Almond