Are the posted questions getting worse?

  • WayneS - Friday, November 9, 2018 11:50 PM

    Lynn Pettis - Friday, November 9, 2018 3:19 PM

    Lynn Pettis - Friday, November 9, 2018 2:39 PM

    How about that the SQL Engine continues search for additional matches on a PRIMARY KEY after it finds it to see if there are other matches.  (head meet desk)

    OMG! More...

    Link please? This sounds too good to pass up... at least to read!

    Lynn Pettis - Friday, November 9, 2018 3:19 PM

    Lynn Pettis - Friday, November 9, 2018 2:39 PM

    How about that the SQL Engine continues search for additional matches on a PRIMARY KEY after it finds it to see if there are other matches.  (head meet desk)

    OMG! More...

    Do you have a link or demonstrable code for that Lynn?  I've never seen such a thing unless the criteria is non-SARGable or the optimizer correctly decides that a scan would be better.

    --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)

  • Jeff Moden - Saturday, November 10, 2018 7:05 AM

    Lynn Pettis - Friday, November 9, 2018 3:19 PM

    Lynn Pettis - Friday, November 9, 2018 2:39 PM

    How about that the SQL Engine continues search for additional matches on a PRIMARY KEY after it finds it to see if there are other matches.  (head meet desk)

    OMG! More...

    Do you have a link or demonstrable code for that Lynn?  I've never seen such a thing unless the criteria is non-SARGable or the optimizer correctly decides that a scan would be better.

    Lynn is referring to this post https://www.sqlservercentral.com/Forums/Dialogs/PostDetails.aspx?PostID=2009398

  • Lynn Pettis - Wednesday, October 31, 2018 2:52 PM

    Grant Fritchey - Wednesday, October 31, 2018 2:36 PM

    Lynn Pettis - Wednesday, October 31, 2018 1:30 PM

    This is a rant, too be honest.  Other than syntactical differences, what is different between the following two queries:

    select
        [a].[co_num]
        , .[cust_po]
        , [a].[co_line]
        , [a].[co_release]
        , [a].[item]
        , [a].[u_m]
        , [a].[qty-ordered]
        , [a].[whse]
        , .[cust_seq]
        , .[ship_code]
    from
        [10.1.10.140\EES_LIVE].[ESS_app].[dbo].[coitem] as [a]
        left outer join [10.1.10.140\EES_LIVE].[ESS_app].[dbo].[co] as
            on [a].[co_num] = .[co_num]
    where
        [a].[co_num] not like '%q0%'
        and [a].[co_line] = 1
    order by
        [a].[co_num] desc;
    go

    select
        [a].[co_num]
        , .[cust_po]
        , [a].[co_line]
        , [a].[co_release]
        , [a].[item]
        , [a].[u_m]
        , [a].[qty-ordered]
        , [a].[whse]
        , .[cust_seq]
        , .[ship_code]
    from
        [10.1.10.140\EES_LIVE].[ESS_app].[dbo].[coitem] as [a]
        left join [ESS_app].[dbo].[co] as
            on [a].[co_num] = .[co_num]
    where
        [a].[co_num] not like '%q0%'
        and [a].[co_line] = 1
    order by
        [a].[co_num] desc;
    go

    Both have horrifying naming standards that will lead to confusion as more tables get introduced and or various different tables are named [a] or . Other than that, the four part name.

    For everyone, the second query didn't work but the first did.  The OP couldn't see the difference either.

    Not only that but totally agreed on the 4 part naming thing and the alias naming thing.  It's not "bullet proof" because there will be an issue in the future when someone decides to change the IP address or instance name of the ESS box.  Folks really shouldn't use 3 or 4 part naming in code.  They should either be using synonyms or pass-through views.  Heh... that would also allow one to get rid of the freakin' brackets in most places. 😀

    Heh... of course, there's also the issue of criteria with a leading wild card and then using NOT on top of it all.

    --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)

  • We started moving our data center last night at 3 am. 12 racks of servers, switches, San, etc. Anticipated finish time was 6 am. We (the network folks) are still connecting servers, configuring ports, and configuring firewalls.

    This may be a resume generating event for some folks.

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Michael L John - Saturday, November 10, 2018 2:43 PM

    We started moving our data center last night at 3 am. 12 racks of servers, switches, San, etc. Anticipated finish time was 6 am. We (the network folks) are still connecting servers, configuring ports, and configuring firewalls.This may be a resume generating event for some folks.

    Heh... Sounds like you may be right.  I guess I don't understand why anyone in the right frame of mind would think that such a move could be done in 3 hours.  How far did you have to move the data center?

    --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)

  • Jeff Moden - Saturday, November 10, 2018 10:00 PM

    Michael L John - Saturday, November 10, 2018 2:43 PM

    We started moving our data center last night at 3 am. 12 racks of servers, switches, San, etc. Anticipated finish time was 6 am. We (the network folks) are still connecting servers, configuring ports, and configuring firewalls.This may be a resume generating event for some folks.

    Heh... Sounds like you may be right.  I guess I don't understand why anyone in the right frame of mind would think that such a move could be done in 3 hours.  How far did you have to move the data center?

    About 5 miles. We finished just under 22 hours after we started.   The entire project was a classic example of resources not being dedicated to a project of this magnitude.  Everyone involved was still being pulled in 20 different directions to perform their "daily chores", while trying to plan and prepare for this move.
    Guess what.  Things got missed.

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Michael L John - Sunday, November 11, 2018 12:37 PM

    About 5 miles. We finished just under 22 hours after we started.   The entire project was a classic example of resources not being dedicated to a project of this magnitude.  Everyone involved was still being pulled in 20 different directions to perform their "daily chores", while trying to plan and prepare for this move.
    Guess what.  Things got missed.

    That's what we did (about 5 miles).  We had about 18 racks.  From the word "GO" on a Friday night, we worked straight through 'til just before the bell rang on Monday morning.  It took more than 3 hours just to de-cable the racks and remove the equipment from the racks.

    --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)

  • Jeff Moden - Saturday, November 10, 2018 9:40 AM

    Not only that but totally agreed on the 4 part naming thing and the alias naming thing.  It's not "bullet proof" because there will be an issue in the future when someone decides to change the IP address or instance name of the ESS box.  Folks really shouldn't use 3 or 4 part naming in code.  They should either be using synonyms or pass-through views.  Heh... that would also allow one to get rid of the freakin' brackets in most places. 😀

    Heh... of course, there's also the issue of criteria with a leading wild card and then using NOT on top of it all.

    I started putting brackets out of self defense, especially in my dynamic SQL as ID 10 T's have broken working code by doing really stupid stuff in production databases regarding names of database objects, like index names.

  • Lynn Pettis - Sunday, November 11, 2018 5:16 PM

    I started putting brackets out of self defense, especially in my dynamic SQL as ID 10 T's have broken working code by doing really stupid stuff in production databases regarding names of database objects, like index names.

    Heh... there IS that problem.  Ironically, that's a part of the reason I don't use brackets.  I'm usually able to figure out "whodunit" and have a pork chop dinner with them. 😀

    --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)

  • Jeff Moden - Monday, November 12, 2018 5:24 AM

    Lynn Pettis - Sunday, November 11, 2018 5:16 PM

    I started putting brackets out of self defense, especially in my dynamic SQL as ID 10 T's have broken working code by doing really stupid stuff in production databases regarding names of database objects, like index names.

    Heh... there IS that problem.  Ironically, that's a part of the reason I don't use brackets.  I'm usually able to figure out "whodunit" and have a pork chop dinner with them. 😀

    As I've just found a database whose filenames (logical & physical) begin with a space but the DBName doesn't, I'm going with Lynn here...

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

  • ThomasRushton - Monday, November 12, 2018 5:34 AM

    As I've just found a database whose filenames (logical & physical) begin with a space but the DBName doesn't, I'm going with Lynn here...

    You should go with me.  It's much more fun to find and pork chop the perpetrator(s). 😀

    --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)

  • Jeff Moden - Monday, November 12, 2018 6:26 AM

    You should go with me.  It's much more fun to find and pork chop the perpetrator(s). 😀

    Sounds like a waste of good pork...  

    ...which reminds me.  I need to get some bacon for tomorrow's breakfast.

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

  • ThomasRushton - Monday, November 12, 2018 5:34 AM

    As I've just found a database whose filenames (logical & physical) begin with a space but the DBName doesn't, I'm going with Lynn here...

    I've got a few databases at work with the database name created in this pattern: c:\directory\subdirectory\filename.mdf.
     So to make a valid backup brackets would be used, the backup then looks like:

     backup database [c:\directory\subdirectory\filename.mdf] to 'another path here' etc. I was a bit confused when I first ran across this thing, the working theory is that this was installed by some vendor support tech who was filling out forms one of which inquired of the database name and that's what he entered and I guess it makes sense in a "don't want to enter the wrong name" sort of way.

  • patrickmcginnis59 10839 - Monday, November 12, 2018 6:35 AM

    I've got a few databases at work with the database name created in this pattern: c:\directory\subdirectory\filename.mdf.
     So to make a valid backup brackets would be used, the backup then looks like:

     backup database [c:\directory\subdirectory\filename.mdf] to 'another path here' etc. I was a bit confused when I first ran across this thing, the working theory is that this was installed by some vendor support tech who was filling out forms one of which inquired of the database name and that's what he entered and I guess it makes sense in a "don't want to enter the wrong name" sort of way.

    Yowch!

    --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)

  • Jeff Moden - Saturday, November 10, 2018 10:00 PM

    Michael L John - Saturday, November 10, 2018 2:43 PM

    We started moving our data center last night at 3 am. 12 racks of servers, switches, San, etc. Anticipated finish time was 6 am. We (the network folks) are still connecting servers, configuring ports, and configuring firewalls.This may be a resume generating event for some folks.

    Heh... Sounds like you may be right.  I guess I don't understand why anyone in the right frame of mind would think that such a move could be done in 3 hours.  How far did you have to move the data center?

    I think the only way you could move a datacenter in 3 hours without missing anything would be if it were one of these:

    Bring in the flatbed trailer, winch it on once you've disconnected power and network, haul it to the new datacenter and drop it off the trailer, re-connect, then realize that some numpty forgot to secure ~1/2 the equipment to the racks and it's all now piled up on the floor...
    OK, yeah, I guess you can't move a datacenter in 3hrs or less...
    :hehe:

Viewing 15 posts - 62,821 through 62,835 (of 66,712 total)

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