hi
in asp.net,i used sql server to store records.
in a table has 1 million records,but when i update the record,it is very slowly.
is "create index" helpful for "update" operation?
i need help,thanks a lot.
First ensure that you have properly created index on you table and primary key.
Second ensure that you have data in table only for one business period( on principle one year).
Make shrink on your data table.
Refactor your data index.
This will help you.
|||Post the update statement you have as well as all the table information. Do an "EXEC sp_Help TableName" in your query analyzer and post the results here.
|||Hi ndinakar:
mytable has 100,000 records, i use "exec sp_help mytable",its result is :
Name Owner Type Created_datetime
mytable dbo user table 2007-11-30 9:34:21
can i get further information
thanks a lot
|||Hi yugiant,
Based on my understanding, you are now tring to creating indexes in your sql server database in order to improve your update performance. If I've understood you wrong, please feel free to tell me, thanks.
Yes I think using index is a good idea. Using indexes in your database will save a lot of time for locating the specific record. And since we need to first locate the record before updating it, I think using index is a great help for improving updating performance. exec sp_help will list properties of your table, including all the indexex you have made to your datatable. You can also get your datatable index information from Object Explorer(in the Indexes tree view node).
I strongly suggesting you reading this:http://msdn2.microsoft.com/en-us/library/ms189051.aspx I think it will be much of help to solve your problem. thanks.
Hope my suggestion helps
No comments:
Post a Comment