Results 1 to 4 of 4

Thread: [RESOLVED] performance issue

  1. #1
    Addicted Member
    Join Date
    Dec 09
    Location
    sydney
    Posts
    175

    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
    Frenzied Member
    Join Date
    Sep 02
    Location
    Columbus, Ohio
    Posts
    1,814

    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
    Lively Member
    Join Date
    Oct 08
    Location
    Califorina
    Posts
    126

    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
    Addicted Member
    Join Date
    Dec 09
    Location
    sydney
    Posts
    175

    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
  •