June 22, 2011 at 7:30 am
Hi,
One of our application is referring the user tables that were created in master database. Now I have copied those tables to a new user database. When the application refers the tables in the new database, it gets very slow but responses normally when refers to master database. The disk I/O is not issue since the files are kept at the same location which master database has.
Please advice.
Ryan
//All our dreams can come true, if we have the courage to pursue them//
June 22, 2011 at 7:44 am
how did you do the copy?
I would check the index fragmentation and fix ths if neccessary and
you may also need to update the stats. (unless you rebuild the inedexes that is)
June 22, 2011 at 8:03 am
It was copied using Import and export wizard. There is no fragmentation of indexes and statistics were updated.
The application is connecting to the database through ODBC and default database is changed the database where tabeles are moved.
Ryan
//All our dreams can come true, if we have the courage to pursue them//
June 22, 2011 at 8:05 am
I would then look at the slowest performing query and compare the execution plan between old (fast) and new (slow) to see where the difference is
June 22, 2011 at 8:19 am
I got the point. I ran index rebuild job and update statistics without checking whether indexes are there or not. Actually keys,indexes are not copied when copied using import export wizard. Is tahere other way to copy the whole including constraints, indexes, statistics?
Ryan
//All our dreams can come true, if we have the courage to pursue them//
June 22, 2011 at 8:27 am
yeah you will need the indexes, you could just script them out from your old database and then run the script against the new database.
i am not sure about the import/export wizard as i do not use it but there must be an option there.
if you are copying to a new database a far easier/safer way it to do a backup/restore as this take through everything.
June 22, 2011 at 8:38 am
Thanks steveb
Ryan
//All our dreams can come true, if we have the courage to pursue them//
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply