| Author |
Topic  |
|
cshah1
Constraint Violating Yak Guru
345 Posts |
Posted - 03/29/2005 : 08:59:17
|
Bravo! RobVolk..
Jeff(Dr. CrossJoin)..Tara (Tduggan), Mladen(spirit1)..Nigel(nr)
I have leanred more from readinig your posts here at SQL team then even reading several books on SQL..Thanks to all of you..! |
Edited by - cshah1 on 03/29/2005 09:04:51 |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
USA
4184 Posts |
Posted - 03/29/2005 : 14:43:50
|
Oh my, you REALLY need to check out some good books then. 
MeanOldDBA derrickleggett@hotmail.com
When life gives you a lemon, fire the DBA. |
 |
|
|
hgorijal
Constraint Violating Yak Guru
India
277 Posts |
Posted - 03/30/2005 : 05:30:49
|
quote: Originally posted by robvolk
I like to use this analogy a lot: you have a cup of coffee (or tea), and you want to put sugar in it. You can use tweezers, or a spoon. Cursors are tweezers.
Seriously. Suppose you will only drink one cup of coffee in your life, would you still use tweezers to sweeten it?
B-E-A-Utiful analogy. I always struggled for an analogy to explain to developers about using set based operations as opposed to cursors.
You haven't patented it. have you? Rob 
Hemanth Gorijala Exchange a Dollar, we still have ONE each._______Exchange an Idea, we both have TWO each. |
 |
|
|
Xerxes
Aged Yak Warrior
USA
665 Posts |
Posted - 03/30/2005 : 15:32:29
|
Using tweezers ain't so bad, maybe you're trying to knock down your cholesterol?
Semper fi, XERXES, USMC(Ret.) ------------------------------------------------------ The Marine Corps taught me everything but SQL! |
 |
|
|
robvolk
Most Valuable Yak
USA
15559 Posts |
Posted - 03/30/2005 : 21:06:31
|
Sugar has no cholesterol anyway. Thank god too, ever since I had to stop putting rare steak in my coffee I've been looking for a suitable substitute.
And have you ever tried putting a large sirloin into a cup of coffee with tweezers???? You thought sugar was tough... |
 |
|
|
elwoos
Flowing Fount of Yak Knowledge
United Kingdom
2039 Posts |
Posted - 03/31/2005 : 03:13:16
|
What about sugar cubes 
steve
A sarcasm detector, what a great idea. |
 |
|
|
coolerbob
Aged Yak Warrior
United Kingdom
841 Posts |
Posted - 03/31/2005 : 08:59:50
|
robvolk,
you mentioned at the end of page one the usefullness of covering indexes. How much should I strive towards making these? Afterall sometimes you just cant have them because of bit/text columns and then SQL will have to go to the table. Is that a big performance hit? Or can I ignore that and try and always get as close to a covering index as possible? |
 |
|
|
robvolk
Most Valuable Yak
USA
15559 Posts |
Posted - 03/31/2005 : 10:43:31
|
You should always test any indexes you add to make sure they actually help. Run tests and check execution plans before and after creating a covering index. If you see an improvement (faster access and/or seeks instead of scans) then you should keep the index.
Indexes are always a balancing act; too many slow down INSERTs and UPDATEs, too few slow down SELECTs. There's no way to know for sure without trying. |
 |
|
|
Kristen
Test
United Kingdom
22191 Posts |
Posted - 04/08/2005 : 13:31:32
|
"What about sugar cubes"
Me too mate. I thought "Sugar lumps, and those nice silver sugar tongs my grandma had", those Yanks are bound to call them Tweezers!
Kristen |
 |
|
|
jerryvn01
Starting Member
3 Posts |
Posted - 07/08/2010 : 05:02:02
|
quote: Originally posted by coolerbob
I can't see how any of the objections you guys made effects me in my situation. I agree that in most situations it is not the best thing to use. But I am writing a one-off data conversition at the moment. The code will run once and then never again. I am often running into all sorts of situations where cursors seem best. Like when I need to go through a whole table and depending on one of 7 possible values I need to: set a column value in the same table, set a column value in a different table, or insert a records in a different table. I cant see why cursors are a bad idea in this situation and I cant see a better/faster option either. Any takers?
Hi,
I do not agreed with you. Any way, your ideal make me thinking about some thing for my project.
Apart from that, this link below may be useful: Please try to keep posting. Tks and best regards
|
Edited by - tkizer on 07/28/2010 13:12:10 |
 |
|
|
tosscrosby
Aged Yak Warrior
USA
676 Posts |
Posted - 07/08/2010 : 10:36:29
|
Check this out. See if all this folks can be wrong. There are enough compelling reasons to avoid them at almost any cost.
http://tinyurl.com/3a3294t
Edit: Any reason to reply to a topic that has been dormant for 5+ years?
Terry
-- A word to the wise ain't necessary - it's the stupid ones that need the advice. -- Bill Cosby
|
Edited by - tosscrosby on 07/08/2010 10:37:25 |
 |
|
|
GilaMonster
Flowing Fount of Yak Knowledge
South Africa
4507 Posts |
Posted - 07/28/2010 : 11:52:34
|
Spam post?
-- Gail Shaw SQL Server MVP |
 |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
|
|
vegetablevn
Starting Member
1 Posts |
Posted - 08/05/2010 : 20:46:22
|
| <spam removed> |
Edited by - vegetablevn on 08/30/2010 03:03:55 |
 |
|
|
hamburg113
Starting Member
3 Posts |
Posted - 04/20/2011 : 10:59:29
|
Hi
This topic help me a lot in developing my project. I will contribute more when I finished it.
|
 |
|
|
patricholier
Starting Member
3 Posts |
Posted - 04/20/2011 : 22:29:39
|
Hi
I found that a member asked same question in this forum some months ago.
Pls use search box to find this questions with comments
If you want to get more materials that related to this topic, you can visit: unspammed
Best regards.
|
Edited by - patricholier on 04/27/2011 03:58:24 |
 |
|
|
GilaMonster
Flowing Fount of Yak Knowledge
South Africa
4507 Posts |
Posted - 04/21/2011 : 01:36:54
|
If you look, this thread is 6 years old...
-- Gail Shaw SQL Server MVP |
 |
|
|
mmarovic
Aged Yak Warrior
Czech Republic
518 Posts |
Posted - 04/21/2011 : 16:32:06
|
Old it is, but it is worth bringing it to light. Too bad I did not know about it when I wrote my "real life analogy" for cursors.
Mirko
My blog: http://mirko-marovic-eng.blogspot.com/ |
 |
|
|
robvolk
Most Valuable Yak
USA
15559 Posts |
Posted - 04/21/2011 : 16:36:58
|
| What was your real life analogy for cursors? |
 |
|
|
reddymrk
Starting Member
USA
6 Posts |
Posted - 04/21/2011 : 16:59:21
|
If you do not have integrity issues(Primary/Foreign key) on the particular table, you can copy 5000 rows to different table(temporary table) and truncate the original. Once truncate the table, you can recopy the data from temporary table, so that you wont loose any constraints associated with original table.
|
 |
|
Topic  |
|