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 |
|
neo302
Starting Member
30 Posts |
Posted - 2006-05-11 : 10:23:18
|
| Hello We do TONS of inserts. 1. Is either one faster?a.Insert Table1 (Col1, Col2, Col3) Values (1, 2, 3).b.Insert Table1 Values (1, 2, 3).i.e. Does specifying the column slow things down at all?Thanks! |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-05-11 : 10:32:01
|
| Have you considered testing it to see if there is any difference?CODO ERGO SUM |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-05-11 : 10:53:04
|
| Specifying the OWNER will help a bit with performance.Using an SProc might help too ... although there is not much query plan to cache!Are you doing these as adhoc inserts, or are you trying to bulk-insert lots of rows as a batch job - in which case Bulk Insert might help, or disabling some indexes during import etc.Are there complex triggers on the tables which might be slowing down inserts and could be better optimised?Foreign Keys / Constraints / etc ???Kristen |
 |
|
|
pootle_flump
1064 Posts |
Posted - 2006-05-11 : 11:00:33
|
There would also be an immense difference if ever your table schema changed so that is worth bearing in mind too |
 |
|
|
neo302
Starting Member
30 Posts |
Posted - 2006-05-11 : 11:01:41
|
quote: Originally posted by Kristen Specifying the OWNER will help a bit with performance.Using an SProc might help too ... although there is not much query plan to cache!Are you doing these as adhoc inserts, or are you trying to bulk-insert lots of rows as a batch job - in which case Bulk Insert might help, or disabling some indexes during import etc.Are there complex triggers on the tables which might be slowing down inserts and could be better optimised?Foreign Keys / Constraints / etc ???Kristen
Hey,We do not use any triggers and we use SPs for all the inserting. The SPs are called based off of events. I was just wondering if there was a difference.Thanks!Justin |
 |
|
|
|
|
|