Are the posted questions getting worse?

  • Phil Parkin wrote:

    Brandie Tarvin wrote:

    Forget leading commas. Let's debate leading semi-colons. @=)

    This could start a flame war! I've seen instances of otherwise-seasoned coders on here using the dreaded

    ;WITH CTE AS (

    pattern, as if it's the right thing to do.

    Heh... leading or trailing semi-colons... I solved that problem a really long time ago (it's why they pay me the big bucks ๐Ÿ˜€ )...

    I don't end code with a semi-colon nor do I start it with one... Instead, and with some exceptions (too long to explain here but there's actually a method to my madness), I put semi-colons on their own line at the beginning of a line instead of using a blank line between queries.

    That does 2 things... it's real easy to see that I remembered to add them and it satisfies both the leading and training semi-colon likes, dislikes, and eventual flame wars. ๐Ÿ˜€

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

  • Not dropping temp tables at the end of stored procedures is one of the pre-requisites to take advantage of the tempdb improvements made to limit metadata contention in tempdb, https://learn.microsoft.com/en-us/archive/blogs/sql_server_team/tempdb-files-and-trace-flags-and-updates-oh-my#metadata-contention.ย  I've seen this contention at a couple of clients in the last year and have had to recommend code changes so that they could get those benefits.

  • Jack Corbett wrote:

    Not dropping temp tables at the end of stored procedures is one of the pre-requisites to take advantage of the tempdb improvements made to limit metadata contention in tempdb, https://learn.microsoft.com/en-us/archive/blogs/sql_server_team/tempdb-files-and-trace-flags-and-updates-oh-my#metadata-contention.ย  I've seen this contention at a couple of clients in the last year and have had to recommend code changes so that they could get those benefits.

    Oops, this wasย  reply to Lynn's comment about dropping/not dropping temp tables at the end of stored procedures and it has been so long since I've posted I forgot that you have to do Quote not Reply to include the post you are replying in your post.

  • Jonathan AC Roberts wrote:

    What I find extremely frustrating is when someone writes SQL code that joins multiple tables without prefixing the column names with their originating table or alias using dot notation. This adds a significant amount of time to the task of determining which columns belong to which tables.

    Gail's No, this is not a bug in T-SQL is such a great example of why it's such a bad habit. I've seen multiple instances of people saying the data engine is bugged, and it's the exact problem she outlines.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Jonathan AC Roberts wrote:

    What I find extremely frustrating is when someone writes SQL code that joins multiple tables without prefixing the column names with their originating table or alias using dot notation. This adds a significant amount of time to the task of determining which columns belong to which tables.

    Gail's No, this is not a bug in T-SQL is such a great example of why it's such a bad habit. I've seen multiple instances of people saying the data engine is bugged, and it's the exact problem she outlines.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • frederico_fonseca wrote:

    Jeff Moden wrote:

    Grant Fritchey wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Thatโ€™s why I like you Jeff, youโ€™re such a smart guy ย ๐Ÿ˜๐Ÿฅณ

    Heh... if I were really smart, I'd just up and retire.ย  That would probably kill me though.

    Just like me ๐Ÿ˜‚, glad I didnโ€™t. Youโ€™ll out live us all ๐Ÿ˜€ youโ€™re an institution you know ๐Ÿ˜ƒ

    I think most folks would say your confused, David.ย  They rather think I should be IN an institution. ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    Second!!

    All in favor?

    And you know I'm kidding.

    Kidding??? Why??? We were going to invite you to join us! ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    by the looks of it WE are ALL in one already (SSC)

    I think we could get a group rate at a sanitarium.

    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 wrote:

    frederico_fonseca wrote:

    Jeff Moden wrote:

    Grant Fritchey wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Thatโ€™s why I like you Jeff, youโ€™re such a smart guy ย ๐Ÿ˜๐Ÿฅณ

    Heh... if I were really smart, I'd just up and retire.ย  That would probably kill me though.

    Just like me ๐Ÿ˜‚, glad I didnโ€™t. Youโ€™ll out live us all ๐Ÿ˜€ youโ€™re an institution you know ๐Ÿ˜ƒ

    I think most folks would say your confused, David.ย  They rather think I should be IN an institution. ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    Second!!

    All in favor?

    And you know I'm kidding.

    Kidding??? Why??? We were going to invite you to join us! ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    by the looks of it WE are ALL in one already (SSC)

    I think we could get a group rate at a sanitarium.

    Scratch that... They should pay us for the entertainment value! ๐Ÿ˜€ ๐Ÿ˜€ D:

    --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 wrote:

    Michael L John wrote:

    frederico_fonseca wrote:

    Jeff Moden wrote:

    Grant Fritchey wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Thatโ€™s why I like you Jeff, youโ€™re such a smart guy ย ๐Ÿ˜๐Ÿฅณ

    Heh... if I were really smart, I'd just up and retire.ย  That would probably kill me though.

    Just like me ๐Ÿ˜‚, glad I didnโ€™t. Youโ€™ll out live us all ๐Ÿ˜€ youโ€™re an institution you know ๐Ÿ˜ƒ

    I think most folks would say your confused, David.ย  They rather think I should be IN an institution. ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    Second!!

    All in favor?

    And you know I'm kidding.

    Kidding??? Why??? We were going to invite you to join us! ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    by the looks of it WE are ALL in one already (SSC)

    I think we could get a group rate at a sanitarium.

    Scratch that... They should pay us for the entertainment value! ๐Ÿ˜€ ๐Ÿ˜€ D:

    Are you saying they can put a fence around us, and charge admission?ย  Like DBA Disneyland?

    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 wrote:

    Jeff Moden wrote:

    Michael L John wrote:

    frederico_fonseca wrote:

    Jeff Moden wrote:

    Grant Fritchey wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Thatโ€™s why I like you Jeff, youโ€™re such a smart guy ย ๐Ÿ˜๐Ÿฅณ

    Heh... if I were really smart, I'd just up and retire.ย  That would probably kill me though.

    Just like me ๐Ÿ˜‚, glad I didnโ€™t. Youโ€™ll out live us all ๐Ÿ˜€ youโ€™re an institution you know ๐Ÿ˜ƒ

    I think most folks would say your confused, David.ย  They rather think I should be IN an institution. ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    Second!!

    All in favor?

    And you know I'm kidding.

    Kidding??? Why??? We were going to invite you to join us! ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    by the looks of it WE are ALL in one already (SSC)

    I think we could get a group rate at a sanitarium.

    Scratch that... They should pay us for the entertainment value! ๐Ÿ˜€ ๐Ÿ˜€ D:

    Are you saying they can put a fence around us, and charge admission?ย  Like DBA Disneyland?

    Yes... and you must be at least this tall to enter.ย  ๐Ÿ˜€

    --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 wrote:

    Michael L John wrote:

    Jeff Moden wrote:

    Michael L John wrote:

    frederico_fonseca wrote:

    Jeff Moden wrote:

    Grant Fritchey wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Thatโ€™s why I like you Jeff, youโ€™re such a smart guy ย ๐Ÿ˜๐Ÿฅณ

    Heh... if I were really smart, I'd just up and retire.ย  That would probably kill me though.

    Just like me ๐Ÿ˜‚, glad I didnโ€™t. Youโ€™ll out live us all ๐Ÿ˜€ youโ€™re an institution you know ๐Ÿ˜ƒ

    I think most folks would say your confused, David.ย  They rather think I should be IN an institution. ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    Second!!

    All in favor?

    And you know I'm kidding.

    Kidding??? Why??? We were going to invite you to join us! ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    by the looks of it WE are ALL in one already (SSC)

    I think we could get a group rate at a sanitarium.

    Scratch that... They should pay us for the entertainment value! ๐Ÿ˜€ ๐Ÿ˜€ D:

    Are you saying they can put a fence around us, and charge admission?ย  Like DBA Disneyland?

    Yes... and you must be at least this tall to enter.ย  ๐Ÿ˜€

    Unless we're already inside, and I think some of us are. Hey, at least we know we're in a box, right? ๐Ÿ˜€

  • Jeff Moden wrote:

    Michael L John wrote:

    Jeff Moden wrote:

    Michael L John wrote:

    frederico_fonseca wrote:

    Jeff Moden wrote:

    Grant Fritchey wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Jeff Moden wrote:

    David Burrows wrote:

    Thatโ€™s why I like you Jeff, youโ€™re such a smart guy ย ๐Ÿ˜๐Ÿฅณ

    Heh... if I were really smart, I'd just up and retire.ย  That would probably kill me though.

    Just like me ๐Ÿ˜‚, glad I didnโ€™t. Youโ€™ll out live us all ๐Ÿ˜€ youโ€™re an institution you know ๐Ÿ˜ƒ

    I think most folks would say your confused, David.ย  They rather think I should be IN an institution. ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    Second!!

    All in favor?

    And you know I'm kidding.

    Kidding??? Why??? We were going to invite you to join us! ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€

    by the looks of it WE are ALL in one already (SSC)

    I think we could get a group rate at a sanitarium.

    Scratch that... They should pay us for the entertainment value! ๐Ÿ˜€ ๐Ÿ˜€ D:

    Are you saying they can put a fence around us, and charge admission?ย  Like DBA Disneyland?

    Yes... and you must be at least this tall to enter.ย  ๐Ÿ˜€

    Well, I guess I'm ruled out.

  • Brandie Tarvin wrote:

    Forget leading commas. Let's debate leading semi-colons. @=)

    NO! Semicolons are TERMINATORS not BEGINNINGATORS!

  • Jack Corbett wrote:

    Jack Corbett wrote:

    Not dropping temp tables at the end of stored procedures is one of the pre-requisites to take advantage of the tempdb improvements made to limit metadata contention in tempdb, https://learn.microsoft.com/en-us/archive/blogs/sql_server_team/tempdb-files-and-trace-flags-and-updates-oh-my#metadata-contention.ย  I've seen this contention at a couple of clients in the last year and have had to recommend code changes so that they could get those benefits.

    Oops, this wasย  reply to Lynn's comment about dropping/not dropping temp tables at the end of stored procedures and it has been so long since I've posted I forgot that you have to do Quote not Reply to include the post you are replying in your post.

    Thanks, but the article I read was a blog post that I still can't find.

     

  • Lynn Pettis wrote:

    Jack Corbett wrote:

    Jack Corbett wrote:

    Not dropping temp tables at the end of stored procedures is one of the pre-requisites to take advantage of the tempdb improvements made to limit metadata contention in tempdb, https://learn.microsoft.com/en-us/archive/blogs/sql_server_team/tempdb-files-and-trace-flags-and-updates-oh-my#metadata-contention.ย  I've seen this contention at a couple of clients in the last year and have had to recommend code changes so that they could get those benefits.

    Oops, this wasย  reply to Lynn's comment about dropping/not dropping temp tables at the end of stored procedures and it has been so long since I've posted I forgot that you have to do Quote not Reply to include the post you are replying in your post.

    Thanks, but the article I read was a blog post that I still can't find.

    Sure,ย  I was just trying to supply a reason why NOT dropping temp tables in stored procedures can be a performance boost.ย  I've never practiced explicitly dropping temp tables in stored procedures because they are dropped at the end of execution anyway and are execution specific, so I never found a reason to drop.

  • Jack Corbett wrote:

    Lynn Pettis wrote:

    Jack Corbett wrote:

    Jack Corbett wrote:

    Not dropping temp tables at the end of stored procedures is one of the pre-requisites to take advantage of the tempdb improvements made to limit metadata contention in tempdb, https://learn.microsoft.com/en-us/archive/blogs/sql_server_team/tempdb-files-and-trace-flags-and-updates-oh-my#metadata-contention.ย  I've seen this contention at a couple of clients in the last year and have had to recommend code changes so that they could get those benefits.

    Oops, this wasย  reply to Lynn's comment about dropping/not dropping temp tables at the end of stored procedures and it has been so long since I've posted I forgot that you have to do Quote not Reply to include the post you are replying in your post.

    Thanks, but the article I read was a blog post that I still can't find.

    Sure,ย  I was just trying to supply a reason why NOT dropping temp tables in stored procedures can be a performance boost.ย  I've never practiced explicitly dropping temp tables in stored procedures because they are dropped at the end of execution anyway and are execution specific, so I never found a reason to drop.

    Old programming habits die hard. Just something that carried over when I started working with MS SQL Server way back in the 6.5 days.

     

Viewing 15 posts - 66,181 through 66,195 (of 66,549 total)

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