Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ripa
Starting Member
2 Posts |
Posted - 2010-12-03 : 05:48:36
|
| i have a large table of size 120GB.the table also have 4 nonclustered index.data is inserted into the table via a view.while inserting data into the table its time out.how can i overcome time out problem.while inserting data via a view does the view select all the data from the table and does the insert operation? |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-03 : 06:09:14
|
| >> while inserting data via a view does the view select all the data from the table and does the insert operation?no.Is the view necessary? It shouldn't be afecting anthing unless someones put something complicated into it.How many rows are being inserted at a time?How is the data inserted? Is it a query in sql server or do you have a client app (ssis is a client app for instance).Does it always time out or does it sometimes succeed - and how long does it take before failing?Any blocking?==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
ripa
Starting Member
2 Posts |
Posted - 2010-12-03 : 06:29:01
|
| thanks for reply,Data is inserted one at a time and via a stored procedure.the acual table is ina different database.but both of the database are on the same server.no,it does not time out always.and i din't actually chek for the blocking. |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-03 : 06:39:46
|
| What does the view look like? is it just select col1,col2,col3,col4,... from tbl.How often does it fail?When it works is it really quick.Does the SP receive one row execute the insert then terminate?How often are you instering on how many connections? Is it many connections doing occasional inserts, one connection running continuous inserts, one call to SP doing many inserts, ...The cross database call may be a factor as it probably has to check permissions each time it runs.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-12-03 : 06:53:23
|
| Execute your View to insert the data & then in a new window of query analyzer run sp_who2 and check whether the Command INSERT is being blocked by any other process in the BlkBy column.PBUH |
 |
|
|
|
|
|