Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top