Forum Replies Created

Viewing 15 posts - 3,751 through 3,765 (of 5,394 total)

  • RE: Running quiry taking too long why?

    Try comparing the ACTUAL execution plans.

    Are they identical?

    If not, are there any missing/different indexes?

  • RE: Know exactly this SPID is taking more CPU on your SQL

    This script extracts the top 20 queries by CPU usage.

    SELECT TOP 20

    query_stats.sql_handle AS "Query Hash",

    ...

  • RE: Lock Pages in Memory

    sqlbee19 (10/21/2010)


    1) Do I need to allow Lock Pages in memory for the SQl server account(Service Account) to aviod this error ? but BOL says it is not required...

  • RE: Using Like

    Here's a sample of how you could do it:

    -- Table to hold the words to search for

    DECLARE @Patterns TABLE (

    search_pattern varchar(50)

    )

    -- Table to hold the text to search in

    DECLARE @test-2...

  • RE: Logging user access

    Yes. You just have to query sys.dm_exec_sessions:

    SELECT program_name

    FROM sys.dm_exec_sessions

    WHERE session_id = @@spid

  • RE: Logging user access

    You can set up a logon trigger and record logins to a table of your choice.

    Here's a sample:

    CREATE TRIGGER [TR_LOGON]

    ON ALL SERVER

    FOR LOGON

    AS

    BEGIN

    UPDATE Logons SET...

  • RE: Are the posted questions getting worse?

    Paul White NZ (10/20/2010)


    WayneS (10/20/2010)


    @paul-2 - interesting colours on your new avatar.

    Thanks - it's almost summer here, so I felt like brightening it up a bit 🙂

    Nice effect! You could...

  • RE: Clustered / NonClustered

    Gianluca Sartori (10/20/2010)


    If you know how to extract a single query's plan from a procedure plan I'll be glad to post it.

    There's a way. Two, indeed.

    Obtaining Statement-Level Query Plans

    SQL...

  • RE: Clustered / NonClustered

    TheSQLGuru (10/20/2010)


    Here's my thought: if they are having unacceptable performance accessing a 13M row table then there is something seriously wrong here - and it isn't likely to be index...

  • RE: Clustered / NonClustered

    OK, I managed to extract a single query plan from the procedure plan, tweaking the xml in a text editor.

    I can't believe there's no easier way to do it.

    Here's...

  • RE: Clustered / NonClustered

    I have to admit that including more columns in the job index worked very well.

    Most of the queries I saw yesterday performing badly got really better today.

    An example of high...

  • RE: Clustered / NonClustered

    Leo.Miller (10/19/2010)


    I suspect the original design didn't expected this concentrated use of the Receiving_Number.

    Leo, the original design didn't expect lots of things. 🙁 This is one of the worst databases...

  • RE: Clustered / NonClustered

    Oliiii (10/19/2010)


    ... you can also give a shot at including more columns in your index to cover most cases and reduce the lookups.

    This is a good point. I've tried to...

  • RE: Clustered / NonClustered

    Leo.Miller (10/18/2010)


    In modern databases 13 million rows isn't relly that big, and the index you mention is being used for seeks. I'd start to worry about it if there were...

  • RE: Clustered / NonClustered

    GilaMonster (10/18/2010)


    Personal preference, probably not. Looks a little too wide for my tastes for a clustered index.

    Check some of the queries doing the lookups, are they selecting majority of the...

Viewing 15 posts - 3,751 through 3,765 (of 5,394 total)