210 reputation
310
bio website
location
age
visits member for 1 year, 11 months
seen 10 hours ago

Sep
3
awarded  Popular Question
Sep
1
awarded  Yearling
Jul
21
awarded  Nice Question
Jun
30
awarded  Notable Question
Dec
17
awarded  Notable Question
Nov
14
comment Speed of one big insert vs multiple small inserts on SQL Server
I tried some of Aaron's suggestions and the difference in performance between inserting one large record into a single table and inserting four smaller records into four different tables fell to 10-20%.
Nov
14
comment Speed of one big insert vs multiple small inserts on SQL Server
@AaronBertrand Thanks, very helpful. I'll see if it runs any faster with the tables allocated to filegroups on different disks.
Nov
14
comment Speed of one big insert vs multiple small inserts on SQL Server
@AaronBertrand, I edited my question to add more detail about the way I did my testing. While I did consider transactions, I did not collect wait stats or check log growth events.
Nov
14
revised Speed of one big insert vs multiple small inserts on SQL Server
added 1236 characters in body
Nov
14
asked Speed of one big insert vs multiple small inserts on SQL Server
Oct
17
awarded  Popular Question
Jul
27
comment How can I “shift” certain column values to different rows in an existing table?
Ah, that makes sense now. As an aside, my actual CTE query was working, but it was because I had aliased the SlotId column in the subquery so it was no longer ambiguous. I just failed to include that detail in the simplified version of the query that I posted here. And thanks for the more efficient version of the query.
Jul
27
accepted How can I “shift” certain column values to different rows in an existing table?
Jul
27
revised How can I “shift” certain column values to different rows in an existing table?
deleted 675 characters in body
Jul
26
answered How can I “shift” certain column values to different rows in an existing table?
Jul
26
comment How can I “shift” certain column values to different rows in an existing table?
Btw, it seems the problem is with the sub-query for the SET clause. If I replace the SELECT with a hard-coded integer, the rows are updated exactly as I would expect.
Jul
26
revised How can I “shift” certain column values to different rows in an existing table?
clarified values in table
Jul
26
comment How can I “shift” certain column values to different rows in an existing table?
@billinkc The destination rows will always exist and be empty (or populated only with the SlotId).
Jul
26
awarded  Commentator
Jul
26
comment How can I “shift” certain column values to different rows in an existing table?
@billinkc I don't think the logic for determining the number of rows to shift matters, but if you want to know the larger context, I'm implementing a queue as a ring buffer in a table along the lines of what Thomas Kejser talks about here: blog.kejser.org/2012/05/25/…. If the ring buffer fills up, I have to increase the number of slots and possibly shift some of the values around. This is part of my routine to add slots to the ring buffer.