Forum Replies Created

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

  • RE: Server-side vs App-side

    rmechaber (7/17/2015)


    Another perspective: do you actually need to store the subtotal in the OrderHeader table?

    This could be computed on-the-fly using views or stored procedures from the actual order details, right?...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

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

  • 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...

  • 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

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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?

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