MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

ESSENTIALS: Home | Tips | Search | Categories | Top 10 | Products | Authors | Blogs | Forums | Webcasts | Advertise | About
Creating index inside the stored procedure -

in Search

Creating index inside the stored procedure

Last post 06-25-2008 8:17 AM by aprato. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-23-2008 11:30 PM

    • artk
    • Top 500 Contributor
    • Joined on 06-24-2008
    • Posts 1

    Creating index inside the stored procedure

    Hi,

    I have 2 options when inserting huge amount of data into tables inside a stored procedure. Can someone please suggest which is a better option to improve performance?

    1. Drop all the index, insert into tables and recreate the index - all done inside the sp.

    2.Drop all the index, insert into the table;                                                                                                                                                  Outside the sp, run a separate batch to recreate index on all tables.

    Thanks.

  • 06-25-2008 8:17 AM In reply to

    • aprato
    • Top 10 Contributor
    • Joined on 12-01-2007
    • Greater Boston
    • Posts 154

    Re: Creating index inside the stored procedure

     What recovery model is your database using?

Page 1 of 1 (2 items)