Forum Replies Created

Viewing 15 posts - 2,371 through 2,385 (of 10,144 total)

  • RE: Self Join alternative

    Sam Garth (7/1/2015)


    Hi

    I am trying to increase performance of a query that joins a table 19 times.

    The current example works similarly to below...

    CREATE TABLE #Data(PersonID INT, Activity nvarchar(200), ActivityTime DATETIME)

    INSERT...

  • RE: How to make actual execution plan better?

    Tac11 (6/30/2015)


    ...

    I didn't understand why execution plan suggesting me to create non-clustered index on this while the table already has a clustered index!!!

    Then you need to read this article[/url].

  • RE: PatReplace8K

    Alan.B (6/30/2015)


    ...Based on my testing, the function appears to perform a bit faster using CHECKSUM over ROW_NUMBER() instead of the conversion to BIGINT in the TOP clause. ...

    So CHECKSUM over...

  • RE: Using a Recursive CTE to Generate a List

    Paul White (6/30/2015)


    ChrisM@Work (6/30/2015)


    If you remember a year or four back when quite a few of us were messing around with rCTE's and figuring out what they were good for,...

  • RE: Using a Recursive CTE to Generate a List

    Jeff Moden (6/30/2015)


    ChrisM@Work (6/30/2015)


    Paul White (6/28/2015)


    ...All this frequently confuses DBAs and developers who are used to tuning performance based solely on logical reads (not a school of thought I subscribe...

  • RE: PatReplace8K

    Nice job, Alan.

    One question: what's the CHECKSUM() for? It doesn't appear to change the result from ROW_NUMBER().

  • RE: Using a Recursive CTE to Generate a List

    IdRatherCodeIt (6/29/2015)


    I used both the cte and for xml to retrieve a grouped list of about 938 rows from a table with 3458 records as the source (filtered for my...

  • RE: Using a Recursive CTE to Generate a List

    Paul White (6/28/2015)


    ...All this frequently confuses DBAs and developers who are used to tuning performance based solely on logical reads (not a school of thought I subscribe to by the...

  • RE: Using a Recursive CTE to Generate a List

    Paul White (6/28/2015)


    The reason I often refer to logical reads of worktables (including spools) being measured in rows rather than pages is an aid to understanding for people who are...

  • RE: Using a Recursive CTE to Generate a List

    Jeff Moden (6/27/2015)


    I'm still working on it. Everything I come up with has had a hole in it.

    Sorry it's been a while Jeff, crazy busy times. Next gig booked...

  • RE: Using a Recursive CTE to Generate a List

    Ed Pollack (6/26/2015)


    ...

    If their documentation is wrong...

    It isn't wrong at all - it's just incomplete.

  • RE: Using a Recursive CTE to Generate a List

    Jeff Moden (6/26/2015)


    Ed Pollack (6/26/2015)


    MSDB has pretty straightforward definitions for the data in question:

    https://msdn.microsoft.com/en-us/library/ms184361.aspx

    If their documentation is wrong, then I'd definitely like to see some sort of proof of that...

  • RE: Using a Recursive CTE to Generate a List

    Jeff Moden (6/26/2015)


    ChrisM@Work (6/26/2015)


    Ed Pollack (6/26/2015)


    This is an innovative way to generate a comma-delimited list, but performance is my main concern here. If you SET STATISTICS IO ON and...

  • RE: Using a Recursive CTE to Generate a List

    Ed Pollack (6/26/2015)


    This is an innovative way to generate a comma-delimited list, but performance is my main concern here. If you SET STATISTICS IO ON and turn on your...

  • RE: Check to see if columns are NOT NULL in a record

    -- Have you tried a computed column?

    DROP TABLE #NameAndAddress

    CREATE TABLE #NameAndAddress (

    NameAndAddressID INT NOT NULL identity(1,1),

    Firstname VARCHAR(20),

    Lastname VARCHAR(20),

    Address1 VARCHAR(50),

    Address2 VARCHAR(50),

    Address3 VARCHAR(50),

    Address4 VARCHAR(50),

    RowIsComplete AS CASE

    WHEN Firstname IS NULL...

Viewing 15 posts - 2,371 through 2,385 (of 10,144 total)