Viewing 15 posts - 20,521 through 20,535 (of 22,226 total)
A little overly complex, but very slick. Nicely done. A+. Please take my seat... no really... take my job, or just shoot me.
BTW, 2005 or better syntax is preferred.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 8:20 am
Absolutely. Even down to the schema, although we were lazy and just left the enums in the 'dbo' schema, but yes. That's the way to go. You're maintaining a bit...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 8:15 am
Again, I'm answering this with little to no information, so please take anything here as mild suggestions, not major pronouncements...
What about a design something like this:
Table: Item
Columns: ItemId
Size
Color
Description
Cost
?
Table: Order
Columns: OrderId
Company
OrderDate
DownPayment
?
Table:...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 7:53 am
It depends on the UDF, but frequently they have no statistics on them, so the optimizer assumes one row. Since, in this case, it really will be one row, I...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 7:44 am
One other thought, this sort of thing usually derives from something the business thinks it's not getting, so it wants to put a more business focused person in place. You...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 7:35 am
Oh, then yes, the data describing the databases is stored in a series of views called dynamic management views. So that's yes to all three.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 7:32 am
If I understand the question, why don't you just maintain this data in a table? Even if it's only one or two rows, you can join against it when you...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 6:49 am
1 & 2, definately.
I'm not sure I understand what #3 is.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 6:42 am
Be very, very nice about it, but get it down in writing that you're suggesting this might be a poor decision. Then, as long as you're getting paid... train away....
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 6:41 am
What does the procedure GETSTOCKLEDGER do? It sounds like you may have incorrect syntax in there, but it could be something wrong on the server itself.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 6:37 am
No. That's a bad plan. If you're maintaining a 2000 database, you should be testing against a 2000 database. There were changes, not necessarily big ones, but they're there, to...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 6:34 am
I had to clean up your code just a bit, but it works just fine:
--created the tables so I could play
IF NOT EXISTS ( SELECT *
...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 6:32 am
Oops. Modulo 3.
:blush:
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 6:04 am
twity61 (4/30/2008)
yes. the users selecting the data that is being updated.
the update take about 15min.
snapshot isolation is good idea. I think it's...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 6:03 am
I wasn't thinking about it earlier, but you could just write the whole thing in SSIS. That will multi-thread very well.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 30, 2008 at 7:19 pm
Viewing 15 posts - 20,521 through 20,535 (of 22,226 total)