Forum Replies Created

Viewing 15 posts - 1,471 through 1,485 (of 5,841 total)

  • RE: Stored Procedure to Update and Insert in single SP

    arunnrj87 (7/17/2015)


    Hi Kevin

    Thank you for your valuable time.

    I have solve this issue by below query.

    IF EXISTS (SELECT SegmentId,SubjectId,StaffId FROM [dbo].[StaffSubjects] WHERE SegmentId = @SegmentId and SubjectId=@SubjectId...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Stored Procedure to Update and Insert in single SP

    1) Your process is full of potential concurrency holes. Don't feel bad - this is a VERY common type of mistake in data processing.

    2) Please provide the entire create table...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Server-side vs App-side

    mike 57299 (7/16/2015)


    Yes, we store the total for the order. I have many small calculations that are done by the app. I want to move them to the...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Server-side vs App-side

    ZZartin (7/16/2015)


    Hmm... in that specific case it sounds like you want to run some kind of batch job to update a field which probably would be better done at the...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Server-side vs App-side

    I agree with Gail - for this particular case. The thing is you need to make this decision (often with many others) for each touch point in your application. And...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: TSQL Fastest way to strip non-numeric characters from a string

    I am very surprised that the XML_PATH is fastest. I always thought XML handling in SQL Server was horribly inefficient and bloated (especially from a memory-use perspective).

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Queue Table Strategies

    If all else fails ...

    Be VERY VERY careful with what that statement REALLY means. You are doing data processing, and if all else fails you could process that...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: can this query be simplified, possibly done without subquery?

    ;WITH cte AS (

    SELECT widgetid, funkcode, ROW_NUMBER() OVER(PARTITION BY widgetid ORDER BY widgetid, id) AS rownum

    FROM @temp)

    SELECT *

    FROM cte

    WHERE rownum = 1

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Database Performance - ASYNC_NETWORK_IO

    Because it could be that your calls are being done one row at a time instead of set based, so check plan/execution calls to see if something is looping instead...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Database Performance - ASYNC_NETWORK_IO

    It can't be blocking, because sp_whoisactive would show that as the wait (and you would see a valud in the blocked column of the output).

    There are SOO many things...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Queue Table Strategies

    yb751 (7/10/2015)


    Hi Folks,

    I'm trying to flesh out a good queue table design with our dev team.

    So here is a general overview of the scenario. First an application will hit...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Database Performance - ASYNC_NETWORK_IO

    1) stop using sp_who/2 and start using sp_whoisactive. AMAZING freebie from Adam Machanic found on SQLBlog.com

    2) it is quite likely that you have a parameter sniffing issue, or other plan...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Poor read-only AlwaysOn replica performance

    HAH!! Dealing with that mess is many hours of work. Sorry - I don't do that for free. 😎

    I will say that your secondary plan has the dreaded "estimated rowcount...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Poor read-only AlwaysOn replica performance

    I asked this before but didn't see an answer: What are the compiled and actual parameter values on both plans?

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Stored Procedure with interesting behavior

    a4apple (7/8/2015)


    1) local variables just shift parameter sniffing to a different form of problem

    2) remove local variables and use the sproc parameters and then try option recompile (preferably on just...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 15 posts - 1,471 through 1,485 (of 5,841 total)