Link to home
Start Free TrialLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

insert statements and indexes sql 2012

I have read that the execution of insert statements in sql slow down when a table has indexes.  Insert statements are regularly used with my rather large table.  Is there a way to index the table and at the same time optimize it so that the insert statements will execute faster?
Avatar of oleggold
oleggold
Flag of United States of America image

You could drop the index before insert and recreate after
if You use any graphic tool,such as quest toad for mssql free You can generate the table's ddl which will contain "create index" command and then  run it after Your insert is complete
i would though verify Your insert doesn't absolutely need any index by checking query execution plan
Avatar of al4629740

ASKER

Drop and then recreate after each time?  This could happen a hundred times in a day?  Really?
SOLUTION
Avatar of oleggold
oleggold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial