You are a SQL Server developer who is...

  • Comments posted to this topic are about the item You are a SQL Server developer who is...

  • nice question 🙂

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • This is great. I didn't know this simple trick.

  • Iwas Bornready (4/6/2016)


    This is great. I didn't know this simple trick.

    This is a QOTD that's 3 1/2 years old.

  • Ed Wagner (4/6/2016)


    Iwas Bornready (4/6/2016)


    This is great. I didn't know this simple trick.

    This is a QOTD that's 3 1/2 years old.

    And this functionality is no longer guaranteed to work as the ORDER BY will be ignored when using TOP 100 PERCENT.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares (4/6/2016)


    Ed Wagner (4/6/2016)


    Iwas Bornready (4/6/2016)


    This is great. I didn't know this simple trick.

    This is a QOTD that's 3 1/2 years old.

    And this functionality is no longer guaranteed to work as the ORDER BY will be ignored when using TOP 100 PERCENT.

    Ed.. 3 1/2 year? Its from 2008, I haven't had any coffee so I can't tell you how long ago that was but I suspect it was longer than 3 1/2 years.

    To Luis' point - for a presentation ORDER BY in a view (which I do sometimes just for testing) I do a TOP (1000000000000) which will not be ignored (nor does it affect the cardinality estimation when the optimizer create's a query plan).

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • Alan.B (4/6/2016)


    Luis Cazares (4/6/2016)


    Ed Wagner (4/6/2016)


    Iwas Bornready (4/6/2016)


    This is great. I didn't know this simple trick.

    This is a QOTD that's 3 1/2 years old.

    And this functionality is no longer guaranteed to work as the ORDER BY will be ignored when using TOP 100 PERCENT.

    Ed.. 3 1/2 year? Its from 2008, I haven't had any coffee so I can't tell you how long ago that was but I suspect it was longer than 3 1/2 years.

    To Luis' point - for a presentation ORDER BY in a view (which I do sometimes just for testing) I do a TOP (1000000000000) which will not be ignored (nor does it affect the cardinality estimation when the optimizer create's a query plan).

    Yeah, you're right. I looked at the "more recent" comment from 2012 to determine 3 1/2 years. It's actually 8 1/4 years old. Answering 8+ year-old questions must be a hobby or something just to clutter up the "Recent Posts" page. It's kind of like spam.

  • The question itself even says from 2003, so... 🙂

  • Ed Wagner (4/6/2016)


    Alan.B (4/6/2016)


    Luis Cazares (4/6/2016)


    Ed Wagner (4/6/2016)


    Iwas Bornready (4/6/2016)


    This is great. I didn't know this simple trick.

    This is a QOTD that's 3 1/2 years old.

    And this functionality is no longer guaranteed to work as the ORDER BY will be ignored when using TOP 100 PERCENT.

    Ed.. 3 1/2 year? Its from 2008, I haven't had any coffee so I can't tell you how long ago that was but I suspect it was longer than 3 1/2 years.

    To Luis' point - for a presentation ORDER BY in a view (which I do sometimes just for testing) I do a TOP (1000000000000) which will not be ignored (nor does it affect the cardinality estimation when the optimizer create's a query plan).

    Yeah, you're right. I looked at the "more recent" comment from 2012 to determine 3 1/2 years. It's actually 8 1/4 years old. Answering 8+ year-old questions must be a hobby or something just to clutter up the "Recent Posts" page. It's kind of like spam.

    Points: 6,708, Visits: 662 "bragging rights" me thinks

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • J Livingston SQL (4/6/2016)


    Ed Wagner (4/6/2016)


    Alan.B (4/6/2016)


    Luis Cazares (4/6/2016)


    Ed Wagner (4/6/2016)


    Iwas Bornready (4/6/2016)


    This is great. I didn't know this simple trick.

    This is a QOTD that's 3 1/2 years old.

    And this functionality is no longer guaranteed to work as the ORDER BY will be ignored when using TOP 100 PERCENT.

    Ed.. 3 1/2 year? Its from 2008, I haven't had any coffee so I can't tell you how long ago that was but I suspect it was longer than 3 1/2 years.

    To Luis' point - for a presentation ORDER BY in a view (which I do sometimes just for testing) I do a TOP (1000000000000) which will not be ignored (nor does it affect the cardinality estimation when the optimizer create's a query plan).

    Yeah, you're right. I looked at the "more recent" comment from 2012 to determine 3 1/2 years. It's actually 8 1/4 years old. Answering 8+ year-old questions must be a hobby or something just to clutter up the "Recent Posts" page. It's kind of like spam.

    Points: 6,708, Visits: 662 "bragging rights" me thinks

    You're probably right. It's not the usual "Thanks for the question" or "Thanks for the article" but almost. At least the spam isn't as frequent as the weekend spam about watching sporting events online.

Viewing 10 posts - 1 through 9 (of 9 total)

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