• yuvipoy (3/6/2014)


    As i said

    TableA C1 uniqueidentifier (PK), C2 uniqueidentifier, C3 ......

    PK is a cluster index

    TableB C1 uniqueidentifier(PK) , C2 uniqueidentifier (FK_TableA_uniqueidentifier ), C3 ......

    Column c1 PK is a cluster index and C2 is non clusterindex

    Trying to insert some million of rows

    C++ is the used to insert the data.

    In C++ the "sql statements" are used to insert the data.

    Since there where no stored procedure used , unique identifer is kept as source for uniquness in the table.

    I am trying to help you here but you just aren't providing details. I asked several questions previously none of which you answered.

    I think you are inserting data into TableA which has a uniqueidentifier as the clustered index? That is source of your problem. The index fragmentation is going to be through the roof.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/