Forum Replies Created

Viewing 15 posts - 181 through 195 (of 429 total)

  • RE: Performance Problem with a Query

    I agree with you. I will discuss this with my developer after going through Gails' blog link.

    But as a DBA, what would someone spot in the execution plan apart from...

  • RE: Performance Problem with a Query

    Gianluca Sartori (11/16/2011)


    The filter predicate

    trans.Company_Link =

    CASE

    WHEN @Company_Link <> 0

    THEN

    @Company_Link

    ELSE

    trans.Company_Link

    END

    looks like a great candidate for dynamic sql.

    See here for more details: http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/

    Moreover, you have lots of LEFT JOINs, that don't help...

  • RE: Questions about CTE with regard to internal execution and Performance

    Thanks BT and Paul. Just an update for anyone who is interested.

    My original CTE query was taking 5 minutes to run.

    then i added an index for a table which...

  • RE: Questions about CTE with regard to internal execution and Performance

    SQL Kiwi (11/9/2011)


    A normal (non-recursive) CTE is just a logical definition, like an (unindexed) view. The results from a CTE are not materialized; the optimizer considers the query as...

  • RE: Question on Execution Plan

    Thank you. I know I need a non-clustered index here to speed up the performance. I am basically not worried for performance as of now. If you read my questions,...

  • RE: Question on Execution Plan

    Thanks Lynn.

    Do you know where Gail(Gilamonster), Grant F, Ninja, Jeff Modem, Celco and other great folks are hiding. I need an expert eye because I do not have...

  • RE: Question on Execution Plan

    Any volunteers to help please!!

  • RE: simple one table query

    GilaMonster (10/15/2011)


    A temp table and 3 updates for what can be done in a single query? Not exactly the best option around for performance...

    Hi Monster,

    Are temp tables bad and should...

  • RE: Query Performance

    Grant Fritchey (10/6/2011)


    chandan_jha18 (10/6/2011)


    Grant Fritchey (10/5/2011)


    paul_ramster (10/5/2011)


    Your outer query has the WHERE clause:

    where PostedDate='1/19/2011'

    and PostedDate is defined in the view as:

    CAST(CAST(SUBSTRING(WH_Status.StatusHistory,CHARINDEX('Batch posted successfully',CONVERT(VARCHAR(MAX),WH_Status.StatusHistory))-35,26) AS DATE) AS DATETIME) AS PostedDate

    You will...

  • RE: Query Performance

    Grant Fritchey (10/5/2011)


    paul_ramster (10/5/2011)


    Your outer query has the WHERE clause:

    where PostedDate='1/19/2011'

    and PostedDate is defined in the view as:

    CAST(CAST(SUBSTRING(WH_Status.StatusHistory,CHARINDEX('Batch posted successfully',CONVERT(VARCHAR(MAX),WH_Status.StatusHistory))-35,26) AS DATE) AS DATETIME) AS PostedDate

    You will always get a...

  • RE: Query Performance

    Grant Fritchey (10/5/2011)


    chandan_jha18 (10/5/2011)


    Grant Fritchey (10/5/2011)


    No real way to tell you anything without more information. Minimum an execution plan.

    You say you're getting a table scan, do you have clustered indexes...

  • RE: Query Performance

    I changed the data type of 2 columns to match the data type of other column so that varchar can be compared with varchar but still it didn't make much...

  • RE: Query Performance

    Thanks. I was trying to remove the cast functions in the 'on' filter which Grant mentioned sometime ago.

    But as you(Paul and Grant) mentioned about posted date which is defined...

  • RE: Query Performance

    Grant Fritchey (10/5/2011)


    No real way to tell you anything without more information. Minimum an execution plan.

    You say you're getting a table scan, do you have clustered indexes on the tables?...

  • RE: Linked Server - SELECT .. INTO

    hindle.steve (10/4/2011)


    I am trying to insert data into a database on a remote server using linked server:

    SELECT * INTO [LinkedServerName].[RemoteDBName].dbo.[RemotetableName] FROM [LocalDBName].dbo.[LocalTableName]

    However I ma getting therror:

    Error 117 The object name...

Viewing 15 posts - 181 through 195 (of 429 total)