• @sean Lange.

    I certainly have no intention to ignore anybody who is trying to help me. If thats the message being conveyed, my apologies.

    So lets start from beginning (given i have read the article you provided this time.)

    We have a process which runs every night which extracts data from SQL server and performs the indexing exercise on a unix box using that data. Below are the steps in which this process works

    1. A stored procedure is executed and it truncate and loads the data in staging table (stg_IndexDetails)

    2. The staging table has 85 columns and about 3 million records which are loaded every night as part of the above mentioned truncate and load process.

    3. Then this table is queried as (Select * from stg_IndexDetails (NOLOCK)) and using the result set of the query, the indexes are generated on the other side.

    4. This is not an one by one operation as process captures the whole resultset and then loops through it. This is a third party application so no control over it about how it processes this data.

    My problem is the performance of Select * from stg_IndexDetails query (step 3). This alone takes about 2 hours to return all the data.

    Does this help?

    Thanks again!