Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234»»

GO Part 1 Expand / Collapse
Author
Message
Posted Friday, September 07, 2012 7:19 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 4:16 AM
Points: 1,635, Visits: 1,155
I looked at the first option and was disappointed that the second one wasn't
Collect $200 for parsing GO.
Post #1355960
Posted Friday, September 07, 2012 7:26 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 9:48 AM
Points: 8,967, Visits: 8,530
Richard Warr (9/7/2012)
I looked at the first option and was disappointed that the second one wasn't
Collect $200 for parsing GO.


+1

Good question. Made me stop and think before my first cup of coffee.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Post #1355967
Posted Friday, September 07, 2012 8:47 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 10:50 AM
Points: 1,230, Visits: 1,364
Lucky me...not fallen prey by the trap GO 5

Nice Question though..


~ Lokesh Vij

Guidelines for quicker answers on T-SQL question
Guidelines for answers on Performance questions

Link to my Blog Post --> www.SQLPathy.com

Follow me @Twitter

Post #1356023
Posted Friday, September 07, 2012 8:48 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 7:53 PM
Points: 3,367, Visits: 1,577
Richard Warr (9/7/2012)
I looked at the first option and was disappointed that the second one wasn't
Collect $200 for parsing GO.


I wish I had thought of that when I was writing the question!

FYI the format of the question was actual from some code I've been using recently to load some data for volume testing. GO 18 get's you about half a million rows, GO 20 gets 2 mil +.

Everyone has been real positive on this question so far. Keep your fingers crossed for me on part 2.


Kenneth Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
Post #1356024
Posted Friday, September 07, 2012 8:53 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 2:31 PM
Points: 3,418, Visits: 3,438
Good question. I always forget that you can do that.
Post #1356031
Posted Friday, September 07, 2012 8:58 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, May 02, 2013 3:45 PM
Points: 3,748, Visits: 928
Excellent question, Kenneth.

Almost caught by the 5, thinking it selected 1 row on every iteration.

Keep these kind of questions comin'!!


"El" Jerry.

"A watt of Ottawa" - Gerardo Galvan
Post #1356037
Posted Friday, September 07, 2012 9:20 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 12, 2013 5:11 AM
Points: 1,168, Visits: 1,470
Thanks for the question. Went for six, as I focused on the iterations, without thinking about the select returning the just inserted rows. But, as others have said, this was a good, fun question.

Please don't go. The drones need you. They look up to you.
Post #1356059
Posted Friday, September 07, 2012 11:10 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 10:31 AM
Points: 18,857, Visits: 12,442
Thanks for the question.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1356130
Posted Friday, September 07, 2012 11:53 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 11:48 AM
Points: 2,602, Visits: 1,553
Nice question. I have used the GO x syntax a few times so for me it was just counting the numbers up correctly. Looking forward to part 2.
Post #1356154
Posted Friday, September 07, 2012 12:29 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 3:33 PM
Points: 1,655, Visits: 10,864
Great question. But it was a good thing I'd had my coffee/tea before I tried answering....


Rob Schripsema
Accelitec, Inc
Post #1356179
« Prev Topic | Next Topic »

Add to briefcase «««1234»»

Permissions Expand / Collapse