Forum Replies Created

Viewing 15 posts - 1,906 through 1,920 (of 2,458 total)

  • RE: Natively Compiled Stored Procedures: What they are all about!

    Great, great article Ed!

    "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

  • RE: T-SQL Pivot Question

    I am better now Jeff, thank you for asking. I dislocated a rib last week. Got it fixed this weekend. All better now. No more softball for me until next...

    "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

  • RE: T-SQL Pivot Question

    Luis Cazares (2/11/2014)


    Have you tested again?

    Luis - I completely flaked out and missed this message. I am truly sorry and feel like a jerk. I fixed the my code and...

    "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

  • RE: T-SQL Pivot Question

    Jeff Moden (7/17/2014)


    Alan.B (2/7/2014)


    Using the tests below: at a million rows PIVOT generates a parallel plan and is like 4X faster. At 5million they both produce parallel plans and...

    "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

  • RE: ORDER BY in a view

    ...I know that TOP ### in order to support ORDER BY is a kludge, that might disappear in a future release.

    I think I know what Post you are talking...

    "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

  • RE: Is It Time To Clear Out Those Quirky Functions?

    Jeff Moden (7/10/2014)


    Alan.B (7/10/2014)


    Phil, you can make this more than twice as fast by turning it into an inline table value function like this:

    To that, I say... are you sure?...

    "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

  • RE: Is It Time To Clear Out Those Quirky Functions?

    aochss (7/10/2014)


    Please, please make the error/warning messages better and more precise...Nothing worse than something like this:

    Msg 8152, Level 16, State 14, Line 1

    String or binary data would be truncated.

    The statement...

    "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

  • RE: Is It Time To Clear Out Those Quirky Functions?

    Phil Factor (7/10/2014)


    Here is a LTRIM function that works for whitespace

    [font="Courier New"]

        -- does a particular procedure  exist

    IF EXISTS ( SELECT  1

                FROM   information_schema.Routines

                WHERE   ROUTINE_NAME = 'LeftTrim'--name of procedire

                        AND ROUTINE_TYPE = 'FUNCTION'--for a...

    "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

  • RE: Is It Time To Clear Out Those Quirky Functions?

    ISNUMERIC('-') returns a 1. Discovered that this week (at an inconvenient time no less).

    "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

  • RE: Stairway to T-SQL: Beyond The Basics Level 8: Coding Shortcuts using += and -= Operators

    It's worth noting that these are referred to as Compound Assignment Operators and you can use them for multiplication (*=), division ( /=), modulo (%=), and a few bitwise...

    "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

  • RE: Instant File Initialization

    Great article, 5 stars. I new nothing about this. Learned something new today already!

    "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

  • RE: SSAS Overview

    stephen.salowitz (7/9/2014)


    Do you know of any great (online preferably) resources that I can use to learn more about SSAS?

    Two key books:

    I don't know what version you are considering but...

    "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

  • RE: SSAS Overview

    stephen.salowitz (7/9/2014)


    Thanks for the info, it was what I was looking for.

    No prob. Glad to help!

    "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

  • RE: Compress table timelines

    Eirikur Eiriksson (7/8/2014)


    No need to complicate things, the only thing needed here is correct window specification for the row_number function.

    😎 ...This brings the cost of execution for this code...

    "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

  • RE: Not sure how to write this query without cursors and/or dynamic sql

    Are we supposed to do your work? Or do you have something done already?

    +1

    Hey, thanks for the smart-*** remark. I'm looking for alternatives to using a cursor here. If...

    "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

Viewing 15 posts - 1,906 through 1,920 (of 2,458 total)