Are the posted questions getting worse?

  • ... Mark one off, 35 days on the calendar to go. 35 days on the calendar to go, 35 days to go, ...

  • Sean Lange (1/23/2015)


    Jeff Moden (1/23/2015)


    Sean Lange (1/23/2015)


    Oh lordy...I just handed a stored proc and was asked advice on how to make it faster. The proc is 3700 lines long, there are almost 200 parameters and another 200 variables. I copied the sql to a text file and there are 113 while loops. Hope they don't want this done quickly as a complete rewrite is in my near future.

    I guess I would ask them what the original requirements are for the code and just start over.

    Jeff please pack up your pork chop launcher and head to Kansas City. I am going to need backup on this one. Every single one of those while loops does nothing but increment a counter. All they need to be is a simple count(*) + 1 instead of looping.

    And did I mention this procedure repeatedly hits a table heap with 27 million rows with the exact same query. :w00t::w00t::w00t:

    That might be a fun proc to see. Now, before you go pre-optimizing ;-), how long does that sucker take to run?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Sean Lange (1/23/2015)


    Oh lordy...I just handed a stored proc and was asked advice on how to make it faster. The proc is 3700 lines long, there are almost 200 parameters and another 200 variables. I copied the sql to a text file and there are 113 while loops. Hope they don't want this done quickly as a complete rewrite is in my near future.

    Can't you just put an index on it?

    <ducking & running>

    "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

  • Sean Lange (1/23/2015)


    Oh lordy...I just handed a stored proc and was asked advice on how to make it faster. The proc is 3700 lines long, there are almost 200 parameters and another 200 variables. I copied the sql to a text file and there are 113 while loops. Hope they don't want this done quickly as a complete rewrite is in my near future.

    Ouch!

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • ... Mark one off, 34 days on the calendar to go. 34 days on the calendar to go, 34 days to go, ...

  • GilaMonster (1/23/2015)


    Luis Cazares (1/22/2015)


    Brandie Tarvin (1/22/2015)


    rodjkidd (1/22/2015)


    Steve Jones - SSC Editor (1/21/2015)


    So....

    What's the superhero costume of choice here? SQL Bits is a month+ away, with the theme of superheroes for the Friday night party.

    Need to get ordering something to take with me.

    Steve, drawing a blank on Cowboy Super Heroes, there must be one that had a penchant for wearing Hawaiian shirts when not as the Super Hero ? πŸ™‚

    Rodders...

    I don't know that Jonah Hex ever wore Hawaiian shirts, but he's a cowboy comics hero. (Not sure about the "super" part either).

    Does it have to be from the comics? What about 80's cartoons like Bravestarr or the Galaxy Rangers?

    I haven't got any clue for a costume. Maybe cheat, buy a green hoodie and go as Arrow (but without a bow due to airline luggage restrictions)

    This[/url], in London? What sort of bow and arrows would you like? I can offer you 30lb ash selfbow, 55lb Victorian-style laminate longbow with pretty handle, 80lb yew, 80lb laminate with a handle but full-compass-tillered, 120lb yew, 130lb laminate, 135lb yew; and a variety of arrows, some pretty, most darned ugly, and a few downright scary.

    β€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • ChrisM@Work (1/26/2015)


    GilaMonster (1/23/2015)


    Luis Cazares (1/22/2015)


    Brandie Tarvin (1/22/2015)


    rodjkidd (1/22/2015)


    Steve Jones - SSC Editor (1/21/2015)


    So....

    What's the superhero costume of choice here? SQL Bits is a month+ away, with the theme of superheroes for the Friday night party.

    Need to get ordering something to take with me.

    Steve, drawing a blank on Cowboy Super Heroes, there must be one that had a penchant for wearing Hawaiian shirts when not as the Super Hero ? πŸ™‚

    Rodders...

    I don't know that Jonah Hex ever wore Hawaiian shirts, but he's a cowboy comics hero. (Not sure about the "super" part either).

    Does it have to be from the comics? What about 80's cartoons like Bravestarr or the Galaxy Rangers?

    I haven't got any clue for a costume. Maybe cheat, buy a green hoodie and go as Arrow (but without a bow due to airline luggage restrictions)

    This[/url], in London? What sort of bow and arrows would you like? I can offer you 30lb ash selfbow, 55lb Victorian-style laminate longbow with pretty handle, 80lb yew, 80lb laminate with a handle but full-compass-tillered, 120lb yew, 130lb laminate, 135lb yew; and a variety of arrows, some pretty, most darned ugly, and a few downright scary.

    Well crap. Now I want to go as the Arrow. And I want the 135lb yew with some scary arrows please.

    "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

  • Steve Jones - SSC Editor (1/23/2015)


    Sioban Krzywicki (1/23/2015)


    GilaMonster (1/23/2015)


    I haven't got any clue for a costume. Maybe cheat, buy a green hoodie and go as Arrow (but without a bow due to airline luggage restrictions)

    See if Steve or Grant or someone else who'll be there can pick you up a cheap bow locally and bring it for you. Arrow would be great.

    We can arrange something, I'm sure. The RG staff are pretty good at helping.

    Decided on something else.

    Shopping list:

    Toy police badge, preferably NYC

    Glove, elbow-length

    Thick cardboard

    Tin foil

    Glass 'gems', red and blue

    Any guesses?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Sean Lange (1/23/2015)


    Oh lordy...I just handed a stored proc and was asked advice on how to make it faster. The proc is 3700 lines long, there are almost 200 parameters and another 200 variables. I copied the sql to a text file and there are 113 while loops. Hope they don't want this done quickly as a complete rewrite is in my near future.

    Nuke from orbit.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Grant Fritchey (1/26/2015)


    Well crap. Now I want to go as the Arrow. And I want the 135lb yew with some scary arrows please.

    I think you'd make a very good Arrow. Just keep the bow in a bag/box until you get inside.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Grant Fritchey (1/26/2015)


    ChrisM@Work (1/26/2015)


    GilaMonster (1/23/2015)


    Luis Cazares (1/22/2015)


    Brandie Tarvin (1/22/2015)


    rodjkidd (1/22/2015)


    Steve Jones - SSC Editor (1/21/2015)


    So....

    What's the superhero costume of choice here? SQL Bits is a month+ away, with the theme of superheroes for the Friday night party.

    Need to get ordering something to take with me.

    Steve, drawing a blank on Cowboy Super Heroes, there must be one that had a penchant for wearing Hawaiian shirts when not as the Super Hero ? πŸ™‚

    Rodders...

    I don't know that Jonah Hex ever wore Hawaiian shirts, but he's a cowboy comics hero. (Not sure about the "super" part either).

    Does it have to be from the comics? What about 80's cartoons like Bravestarr or the Galaxy Rangers?

    I haven't got any clue for a costume. Maybe cheat, buy a green hoodie and go as Arrow (but without a bow due to airline luggage restrictions)

    This[/url], in London? What sort of bow and arrows would you like? I can offer you 30lb ash selfbow, 55lb Victorian-style laminate longbow with pretty handle, 80lb yew, 80lb laminate with a handle but full-compass-tillered, 120lb yew, 130lb laminate, 135lb yew; and a variety of arrows, some pretty, most darned ugly, and a few downright scary.

    Well crap. Now I want to go as the Arrow. And I want the 135lb yew with some scary arrows please.

    Your wish etc etc PM me if you're sure and we'll fix it up.

    β€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • ChrisM@Work (1/26/2015)


    Grant Fritchey (1/26/2015)


    ChrisM@Work (1/26/2015)


    GilaMonster (1/23/2015)


    Luis Cazares (1/22/2015)


    Brandie Tarvin (1/22/2015)


    rodjkidd (1/22/2015)


    Steve Jones - SSC Editor (1/21/2015)


    So....

    What's the superhero costume of choice here? SQL Bits is a month+ away, with the theme of superheroes for the Friday night party.

    Need to get ordering something to take with me.

    Steve, drawing a blank on Cowboy Super Heroes, there must be one that had a penchant for wearing Hawaiian shirts when not as the Super Hero ? πŸ™‚

    Rodders...

    I don't know that Jonah Hex ever wore Hawaiian shirts, but he's a cowboy comics hero. (Not sure about the "super" part either).

    Does it have to be from the comics? What about 80's cartoons like Bravestarr or the Galaxy Rangers?

    I haven't got any clue for a costume. Maybe cheat, buy a green hoodie and go as Arrow (but without a bow due to airline luggage restrictions)

    This[/url], in London? What sort of bow and arrows would you like? I can offer you 30lb ash selfbow, 55lb Victorian-style laminate longbow with pretty handle, 80lb yew, 80lb laminate with a handle but full-compass-tillered, 120lb yew, 130lb laminate, 135lb yew; and a variety of arrows, some pretty, most darned ugly, and a few downright scary.

    Well crap. Now I want to go as the Arrow. And I want the 135lb yew with some scary arrows please.

    Your wish etc etc PM me if you're sure and we'll fix it up.

    Chris I did wonder if you would offer up your arsenal for SQL Bits! πŸ˜€

    Will you be making an appearance?

    Cheers,

    Rodders...

  • rodjkidd (1/26/2015)


    ChrisM@Work (1/26/2015)


    Grant Fritchey (1/26/2015)


    ChrisM@Work (1/26/2015)


    GilaMonster (1/23/2015)


    Luis Cazares (1/22/2015)


    Brandie Tarvin (1/22/2015)


    rodjkidd (1/22/2015)


    Steve Jones - SSC Editor (1/21/2015)


    So....

    What's the superhero costume of choice here? SQL Bits is a month+ away, with the theme of superheroes for the Friday night party.

    Need to get ordering something to take with me.

    Steve, drawing a blank on Cowboy Super Heroes, there must be one that had a penchant for wearing Hawaiian shirts when not as the Super Hero ? πŸ™‚

    Rodders...

    I don't know that Jonah Hex ever wore Hawaiian shirts, but he's a cowboy comics hero. (Not sure about the "super" part either).

    Does it have to be from the comics? What about 80's cartoons like Bravestarr or the Galaxy Rangers?

    I haven't got any clue for a costume. Maybe cheat, buy a green hoodie and go as Arrow (but without a bow due to airline luggage restrictions)

    This[/url], in London? What sort of bow and arrows would you like? I can offer you 30lb ash selfbow, 55lb Victorian-style laminate longbow with pretty handle, 80lb yew, 80lb laminate with a handle but full-compass-tillered, 120lb yew, 130lb laminate, 135lb yew; and a variety of arrows, some pretty, most darned ugly, and a few downright scary.

    Well crap. Now I want to go as the Arrow. And I want the 135lb yew with some scary arrows please.

    Your wish etc etc PM me if you're sure and we'll fix it up.

    Chris I did wonder if you would offer up your arsenal for SQL Bits! πŸ˜€

    Will you be making an appearance?

    Cheers,

    Rodders...

    I'd love to come along, Rodders. Depends how things pan out here - our little team's going to be in the deep stuff from next week for around 6 weeks or so and I have a shedload of other stuff on my plate which is munching up the weekends. Excell isn't that hard to get to from home, however...

    Are you still around Bracknell?

    β€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • Chris,

    Are well it would be good to see you there!

    Bracknell - no, I ended at the end of the year. Had a couple of weeks R&R and now looking for the next one. Might have something in Cambridge but it's all gone a bit quiet :O

    Rodders...

  • rodjkidd (1/23/2015)


    Gianluca - well introduce yourself at the registration desk. I'll probably be on it with the other helpers at some point...

    Oh and nowhere near 2m tall! But probably armed with a camera!

    Will do, thanks!

    -- Gianluca Sartori

Viewing 15 posts - 47,116 through 47,130 (of 66,712 total)

You must be logged in to reply to this topic. Login to reply