| Author |
Topic  |
|
PSamsig
Constraint Violating Yak Guru
Denmark
382 Posts |
Posted - 07/13/2011 : 12:48:32
|
quote: Originally posted by SwePeso
... INNER JOIN ( values(666) ) D(id) ...
Never seen that before, even when joking, I learn something new. And isn't it strange, after I thought of the UPDATE OUTPUT to get rid of the SELECT, I didn't notice I ended up with a SELECT after all, thank you for saving me from my own ignorence :)
-- If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. |
Edited by - PSamsig on 07/13/2011 12:51:37 |
 |
|
|
JimL
SQL Slinging Yak Ranger
USA
1530 Posts |
|
|
robvolk
Most Valuable Yak
USA
15559 Posts |
|
|
GilaMonster
Flowing Fount of Yak Knowledge
South Africa
4507 Posts |
Posted - 07/19/2011 : 16:54:44
|
I've got someone over at SSC that's been whining for 2 days that he wants a script to move indexes. No signs of any work. I'd help, but each time he whines I get less motivated to go and do the search for him. (link later if you want)
-- Gail Shaw SQL Server MVP |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
USA
6997 Posts |
Posted - 07/19/2011 : 17:09:31
|
quote: Originally posted by GilaMonster
I've got someone over at SSC that's been whining for 2 days that he wants a script to move indexes. No signs of any work. I'd help, but each time he whines I get less motivated to go and do the search for him. (link later if you want)
-- Gail Shaw SQL Server MVP
I saw that. Wants to move 10,000 tables to a new filegroup, but doesn't want to do any work.
CODO ERGO SUM |
 |
|
|
robvolk
Most Valuable Yak
USA
15559 Posts |
|
|
GilaMonster
Flowing Fount of Yak Knowledge
South Africa
4507 Posts |
Posted - 07/19/2011 : 17:52:59
|
Yeah, that's the one. Maybe I'll find 5 minutes tomorrow. Maybe not.
-- Gail Shaw SQL Server MVP |
 |
|
|
russell
Pyro-ma-ni-yak
USA
4965 Posts |
Posted - 07/19/2011 : 17:54:39
|
Would at least like to see the guy demonstrate SOME effort before I spent the 5 minutes  |
 |
|
|
GilaMonster
Flowing Fount of Yak Knowledge
South Africa
4507 Posts |
Posted - 07/19/2011 : 18:01:11
|
Ice, hell, pigs, fly...
-- Gail Shaw SQL Server MVP |
 |
|
|
russell
Pyro-ma-ni-yak
USA
4965 Posts |
Posted - 07/19/2011 : 18:01:59
|
| LOL Gail. |
 |
|
|
RickD
Slow But Sure Yak Herding Master
United Kingdom
3560 Posts |
Posted - 07/20/2011 : 04:30:38
|
I can't believe someone gave in and gave him a script. Then again, the OP won't understand it anyway, so this should be fun. Next question, "can someone explain this script to me"..  |
 |
|
|
GilaMonster
Flowing Fount of Yak Knowledge
South Africa
4507 Posts |
Posted - 07/20/2011 : 09:14:36
|
Not a very good script, not even a acceptable one. Joining to sys.indexes 22 times with a triangular join. Ugly.
Not going to say anything. same person who contributed that posted on a whole bunch of other threads, a few posts authoritatively wrong
-- Gail Shaw SQL Server MVP |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
USA
6997 Posts |
Posted - 07/20/2011 : 09:37:16
|
quote: Originally posted by GilaMonster
Not a very good script, not even a acceptable one. Joining to sys.indexes 22 times with a triangular join. Ugly.
Not going to say anything. same person who contributed that posted on a whole bunch of other threads, a few posts authoritatively wrong
-- Gail Shaw SQL Server MVP
I don't know when he came up with the 22 column composite index; the limit on indexes is 16 columns.
From SQL Server 2008 Books Online " SQL Server 2008 Books Online (August 2008) CREATE INDEX (Transact-SQL) ... Up to 16 columns can be combined into a single composite index key. All the columns in a composite index key must be in the same table or view. The maximum allowable size of the combined index values is 900 bytes..."
Edit: Maybe he meant an index with included columns. If that is the case, I think the limit is much higher.
CODO ERGO SUM |
Edited by - Michael Valentine Jones on 07/20/2011 09:39:56 |
 |
|
|
GilaMonster
Flowing Fount of Yak Knowledge
South Africa
4507 Posts |
Posted - 07/20/2011 : 09:51:17
|
I suspect it's include. The limit's the same as columns in a table I believe, huge. I have some indexes with 30+ include columns.
Personally I'd just use a subquery with the XML string concatenation trick to get the key and include columns, the rest is really trivial
-- Gail Shaw SQL Server MVP |
 |
|
|
russell
Pyro-ma-ni-yak
USA
4965 Posts |
Posted - 08/12/2011 : 00:12:48
|
Honest question: How long do you intend to let Celko be an ass to people?
He offers nothing. He gives bad advice. He offends people. He scares off newbies. And he's a dick.
It would almost be ok if he was right 50% of the time, but he isn't.
He is an embarrassment to this fine community. |
Edited by - russell on 08/12/2011 00:14:59 |
 |
|
|
GilaMonster
Flowing Fount of Yak Knowledge
South Africa
4507 Posts |
Posted - 08/12/2011 : 04:32:00
|
He's an embarrassment on all forums
-- Gail Shaw SQL Server MVP |
 |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
|
|
GilaMonster
Flowing Fount of Yak Knowledge
South Africa
4507 Posts |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
|
|
DonAtWork
Flowing Fount of Yak Knowledge
2111 Posts |
|
Topic  |
|