Forum Replies Created

Viewing 15 posts - 2,116 through 2,130 (of 4,087 total)

  • RE: Query optimization

    CELKO (12/6/2016)


    Now you're just making up stuff to support your claims.

    No, I get called in every now and then by product developers a lot of different SQL companies to...

  • RE: Computed column possibility

    EasyBoy (12/6/2016)


    Thanks for reply. But, how can i use that column into main SP?

    It's no different from any other column. You either reference it indirectly through the view or...

  • RE: effective use of subquery with a where condition

    CELKO (12/6/2016)


    I hope that “is_active” is not a bit flag; that would mean you are using assembly language programming in SQL and we do not do that.

    Not that means that...

  • RE: Weird Resource Database Message in Error Log

    ingcruzmoreno (12/6/2016)


    Were you able to fix this problem? I just got the same error. :S

    He already said that he had fixed it, but didn't remember what he did. And...

  • RE: trying to get rid of clustered index scan

    It's extremely difficult to troubleshoot performance issues without an execution plan (preferably actual). Can you attach the plan as a .sqlplan file?

    In the meantime, you might want to try...

  • RE: Query optimization

    CELKO (12/6/2016)


    Using proprietary dialect constructs like CROSS APPLY and TOP make optimization difficult

    Now you're just making up stuff to support your claims.

    and portability impossible.

    Who cares?!?! Most people here...

  • RE: Script to replace ","

    adonetok (12/6/2016)


    I tried the way from SSChasing Mays but got an error once I changed table name from "orders" to my table's name.

    Where is "near '-'" from script?

    (352866 row(s) affected)

    Msg...

  • RE: Computed column possibility

    Here is the text.

    create procedure sp_dailyreq

    .....

    SELECT u.id,

    u.NAME,

    ...

  • RE: insert/copy deleted rows from within while loop

    Just include the @id and id values in your debug table.

    INSERT INTO @DebugTable(

    input_id,

    id,

    Result_On,

    AlarmId,

    [Target],

    Result)

    SELECT

    @id,

    id,

    @AlarmStart,

    @AlarmEnd,

    Result_On

    FROM @Results

    Drew

  • RE: Pages Read & Written by a single query

    Adi Cohn-120898 (12/6/2016)


    You can use the profiler to show that. Another option is to use the extended events. You can see the amount of pages that the query...

  • RE: Select query inside procedure taking long time, clustered indexes doing scans, need suggestion

    @Sean, The splitter definition is in the query plan file.

    CREATE FUNCTION [dbo].[fn_SplitString]

    (

    -- Add the parameters for the function here

    @List NVARCHAR(MAX),

    @Delimiter NVARCHAR(255)

    )

    RETURNS...

  • RE: Unexpected Behavior With TOP clause in a DELETE

    Recurs1on (12/5/2016)


    drew.allen (12/5/2016)


    I also notice that your deleting from tableA, but filtering TableB, so you're going to keep getting the same 10000 rows from TableB every time through the loop.

    Have...

  • RE: AlwaysOn Availability Group Query database count

    It sounds like the is_primary_replica condition should be part of the JOIN criteria instead of in the WHERE clause.

    select ag.Name, ag.Group_Id, agl.dns_name as 'ListenerName', COUNT(db.database_id) 'DatabaseCount'

    from master.sys.availability_groups ag

    inner...

  • RE: Unexpected Behavior With TOP clause in a DELETE

    I also notice that your deleting from tableA, but filtering TableB, so you're going to keep getting the same 10000 rows from TableB every time through the loop.

    Have you tried...

  • RE: Get only the top 1 from each subset of data`

    TheSQLGuru (12/5/2016)


    That looks workable. There is a solution with CROSS APPLY too. Look up Itzik Ben-Gan TOP rows per group.

    This probably doesn't meet the conditions for top rows per group....

Viewing 15 posts - 2,116 through 2,130 (of 4,087 total)