Forum Replies Created

Viewing 15 posts - 1,846 through 1,860 (of 2,462 total)

  • RE: do you have a StripNonNumeric ITVF function?

    Eirikur Eiriksson (11/3/2014)


    Adding a little bit of tinkering based on the operator cost results in the previous post, mainly changing from the CASE to a WHERE clause for filtering. Not...

    "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: do you have a StripNonNumeric ITVF function?

    mister.magoo (11/4/2014)


    If you want a major duration boost, you can always slip Adam Machanic's "make_parallel" function into the mix and then you get some serious results...

    Adam's function : http://sqlblog.com/blogs/adam_machanic/archive/2013/07/11/next-level-parallel-plan-porcing.aspx

    In use...

    "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: Adding new filegroup to an existing partition scheme

    I figured it out.

    Using the DDL above I would...

    -- (1) Add new file group

    ALTER DATABASE temp2

    ADD FILEGROUP tp2fg6;

    GO

    -- (2) Create new file for the filegroup

    ALTER DATABASE...

    "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: good SQL Server dba books

    Ditto what was said thus far.

    ...and especially operational side of it(such as backup/restore, performance tuning, and security administration)

    I would add: Beginning SQL Server 2012 Administration 😉

    "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: do you have a StripNonNumeric ITVF function?

    Jeff Moden (10/30/2014)


    We also need to try the same thing on Alan's good pattern matching code.

    Sorry for not checking back sooner - I spent the weekend dealing with some <sarcasm>very...

    "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: do you have a StripNonNumeric ITVF function?

    So I made the following change to Eirikur's function to so that it takes a pattern as a parameter:

    -- refactoring...

    CREATE FUNCTION dbo.STRIP_NUM_EE_PAT

    (

    @INSTR VARCHAR(8000),

    ...

    "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: do you have a StripNonNumeric ITVF function?

    Jeff Moden (10/28/2014)


    I took the two contenders from your good post, Alan, and added on of my own. Here's the code for the function I use for such things....

    "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: do you have a StripNonNumeric ITVF function?

    Eirikur Eiriksson (10/28/2014)


    Little clean up in the logic, now it looks pretty good

    😎

    /********************************************************************

    -- Stripping out any non-numerical characters

    -- EE 2014-10-28 Inital coding

    -- EE ...

    "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: do you have a StripNonNumeric ITVF function?

    Jeff Moden (10/27/2014)


    Out of all of these submittals, which post has the fastest code? I'd check for myself but I'm on the run right now but want to check...

    "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: do you have a StripNonNumeric ITVF function?

    mickyT (6/25/2014)


    Hi

    Interestingly enough I tried a similar test on 2012 for the originals and got elapsed times that so close as to be the same. It may have been...

    "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: Sum subset in group

    Alan.B (10/10/2014)


    SELECT column1, sum (column2)

    FROM <yourtable>

    WHERE column1=1

    GROUP BY column1

    How embarrassing, I did not realize, at the time I posted this, that this was an SSRS forum (smacking forehead).

    "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: Sum subset in group

    SELECT column1, sum (column2)

    FROM <yourtable>

    WHERE column1=1

    GROUP BY column1

    "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: Improving Index Seek

    Jason beat me toops it...Estimated rows are 1, actual are 860... sounds like a possible stats issue.

    Could also be parameter sniffing. Have you tried running your query with...

    "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: Import data from html document Into SQL Table

    Eirikur Eiriksson (10/9/2014)


    Nice job Alan!

    😎

    Thanks!

    "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: Import data from html document Into SQL Table

    1. Phil's article is excellent; I never read it until today after I saw that Erikur posted it.

    2. Second, can you post and example of the HTML files that...

    "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,846 through 1,860 (of 2,462 total)