Results 1 to 4 of 4

Thread: [RESOLVED] performance issue

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2009
    Location
    sydney
    Posts
    265

    Resolved [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 ??

  2. #2
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    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.

  3. #3
    Addicted Member
    Join Date
    Oct 2008
    Location
    Califorina
    Posts
    235

    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/

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2009
    Location
    sydney
    Posts
    265

    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
  •  



Click Here to Expand Forum to Full Width