|
-
Aug 9th, 2012, 08:50 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] performance issue
I have a table with about 200,000 records. so last week i decided to reduce the size to optimize performance so i backed up the table using
Code:
select *into table_1 from table
after few days, i needed to restore data that has been deleted, so i renamed the tables
table_1 to table
and
table to table_1
then did a query to insert the the newly added records and consolidate both tables
Code:
insert into table (a,b,c) select a,b,c from table_1 where datecreated > '02/08/2012'
Now that was all fine, but im just wondering if this would cause any indexing issues or corruptions. as i started to experiance performance and speed issues lately. i made sure there was no duplicates and ran
dbcc checktable ("products");
any suggestions ??
-
Aug 10th, 2012, 05:26 AM
#2
Re: performance issue
I believe when you did this:
select *into table_1 from table
Table_1 does not have the indexes table did. Check that and I think you will need to create them.
-
Aug 10th, 2012, 12:48 PM
#3
Addicted Member
Re: performance issue
DBCC checktable just checks the integrity of the table. You will would want to check the index fragmentation. Are you querying the table that you did the select into? If so like Tyson said their no index on the table that was created with the select into cmd. For the index fragmentation everyone has their own opinion of when they data should be reorg or rebuild. Here are a few pages that give you some info
http://blogs.msdn.com/b/jorgepc/arch...rver-2005.aspx
http://www.sqlservercentral.com/blog...fragmentation/
-
Aug 12th, 2012, 05:29 PM
#4
Thread Starter
Hyperactive Member
Re: performance issue
actually it was the PK that was missing. i created it and all seems to be back to normal now. Thanks for the info
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|