Forum Replies Created

Viewing 15 posts - 1,516 through 1,530 (of 5,502 total)

  • RE: Are the posted questions getting worse?

    GilaMonster (5/23/2011)


    Just got a PM and a mail asking for some free consulting. I sympathise with people in tough situations, but that doesn't mean I'm willing to give telephonic support...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: blocking due to long query, insert, and new queries

    sgambale (5/23/2011)


    There are 5 or 6 tables in the query plus aggregation.

    Most queries need this refresh table, so that's the main problem and why a delete/insert is needed vs. truncate/insert.

    There...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: blocking due to long query, insert, and new queries

    sgambale (5/23/2011)


    I continually inform the users (there is one main user who runs these long queries) to break down the queries, but assume that some queries are just going to...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Getting @@RowCount in select statement doesn't work in Proc

    Straight from BOL:

    Statements that make a simple assignment always set the @@ROWCOUNT value to 1. No rows are sent to the client. Examples of these statements are: SET @local_variable, RETURN,...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: delete rows

    laddu4700 (5/22/2011)


    Resolved.

    parent table column referring itself. that is why my sp is getting error nesting level exceeded (limit 32).

    I have modified SP and it worked

    WHERE SO2.Name = @cTableName and so1.name...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Is there a better way for this query?

    GilaMonster (5/22/2011)


    http://www.google.com/search?q=computed+persisted+column

    In most cases a computed column can be indexed without needing to persist it.

    The reason for suggesting the column as being persisted was mainly driven by the (assumed) improved...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Rolling date extract question

    Something like this?

    SELECT DATEADD(yy,-2,DATEADD(qq,DATEDIFF(qq,0,GETDATE())+1,0))



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Is there a better way for this query?

    I think the biggest issue is the clustered index scan of the cov table.

    It might help to add a computed persisted column to get rid of the CASE expression on...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Trigger Activity

    You could setup an audit table to identify how often a trigger is fired and how many rows are inserted/deleted.

    But this would require to touch each and every trigger. If...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Is there a better way for this query?

    Please provide table def and index def for the tables involved.

    At a first glance it looks like there's a missing index to support the t.rid = c.rid join (among others).

    What...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: 24/7 shift pattern data retrieval query

    I would probably use a calendar table and a second table to describe the shift pattern.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: calculation for the multiple periods in the date range

    Errrmm... Did you read the article I pointed you at?

    We might have a slightly different definition of "ready to use"...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Problem with fetch and cursor

    Or, get rid of the c.u.r.s.o.r. and the dynamic SQL in the first place and use a set based solution:

    DECLARE @tbl TABLE

    (

    organization VARCHAR(10),

    data_viewVARCHAR(10),

    subgroup VARCHAR(10),

    amount INT

    )

    INSERT INTO @tbl

    VALUES ('EAGLE','INTERCO','SMASGRP',...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: calculation for the multiple periods in the date range

    It might be more efficient to unpivot the data instead of comparing column by column.

    You could either lookup UNPIVOT in BOL (BooksOnLine, the SQL Server help system, usually installed together...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Table Variable vs Temp Table, 70-451 preparation questions

    It depends on the scenario.

    There are cases where a table variable would be preferred over a temp table (e.g. to capture some values even after a rollback). Without knowing the...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 1,516 through 1,530 (of 5,502 total)