Forum Replies Created

Viewing 15 posts - 451 through 465 (of 758 total)

  • RE: SQL Plan Cache

    GilaMonster (8/17/2012)


    No. It should just be the use count of the parameterised query. That's the actual plan.

    Ok

    Everytime the unparameterized shell query gets executed, the usecount for the parameterized plan doesn't...

  • RE: SQL Plan Cache

    GilaMonster (8/17/2012)


    Not that I'm aware of, and no. Prepared are parameterised statements, auto, forced or manually parameterised.

    Thanks

    To get an accurate count of how many times the parameterized plan was used...

  • RE: SQL Plan Cache

    GilaMonster (8/16/2012)


    SQLSACT (8/16/2012)


    Shouldn't the usecount for the parameterised plan be 3 because there are 3 queries?

    Probably. Why don't you investigate and figure out why it's not 3?

    Thanks again for you...

  • RE: Index Range_scans

    TheSQLGuru (8/16/2012)


    SQLSACT (8/8/2012)


    Hi All

    I'm struggling to understand why my Index is reporting Range_scans

    DDL:

    Table:

    CREATE TABLE [dbo].[Indexing2](

    [Col1] [int] IDENTITY(1,1) NOT NULL,

    [Col2] [int] NULL,

    [Col3] [int] NULL,

    [Col4] [int] NULL

    )

    Indexes:

    CREATE CLUSTERED INDEX [CX] ON [dbo].[Indexing2]...

  • RE: SQL Plan Cache

    GilaMonster (8/16/2012)


    SQLSACT (8/16/2012)


    Shouldn't the usecount for the parameterised plan be 3 because there are 3 queries?

    Probably. Why don't you investigate and figure out why it's not 3?

    Thanks so much Gail!!

    These...

  • RE: SQL Plan Cache

    GilaMonster (8/16/2012)


    They're not 2 plans for the selects. I already said what's happening.

    I strongly suggest you go and read SQL 2008 internals, chapter 9.

    Repo:

    DBCC FreeProcCache

    go

    CREATE TABLE t1 (

    Col1 INT,

    Col2 DATETIME...

  • RE: SQL Plan Cache

    GilaMonster (8/16/2012)


    They're not 2 plans for the selects. I already said what's happening.

    I strongly suggest you go and read SQL 2008 internals, chapter 9.

    Repo:

    DBCC FreeProcCache

    go

    CREATE TABLE t1 (

    Col1 INT,

    Col2 DATETIME...

  • RE: SQL Plan Cache

    GilaMonster (8/16/2012)


    Be careful, cached plans will show the unparameterised plan shells as well as the parameterised plans, your filter's eliminating the parameterised plans.

    -- AND cp.objtype = 'Adhoc'

    As I said, you...

  • RE: SQL Plan Cache

    GilaMonster (8/16/2012)


    A query complex enough that it doesn't qualify for autoparameterisation (and this is the point where you go to BoL to see what autoparam is)

    Will do, thanks

    Please help me...

  • RE: SQL Plan Cache

    GilaMonster (8/16/2012)


    In that trivial case, if they are submitted in 3 separate batches, there will be one plan (autoparameterised) used 3 times.

    Thanks

    What would cause SQL Server to generate a seperate...

  • RE: SQL Plan Cache

    GilaMonster (8/16/2012)


    SQLSACT (8/15/2012)


    To make sure I have this right, if a Query is submitted to SQL Server and it's not part of a Stored Procedure, SQL Server has to generate...

  • RE: SQL Plan Cache

    Grant Fritchey (8/15/2012)


    That number does seem high, but only because I've primarily worked on systems with stored procedures. If you're working with lots of dynamic or ad hoc SQL, then...

  • RE: SQL Plan Cache

    Grant Fritchey (8/15/2012)


    That number does seem high, but only because I've primarily worked on systems with stored procedures. If you're working with lots of dynamic or ad hoc SQL, then...

  • RE: Understanding Latches\Locks

    GilaMonster (8/15/2012)


    No, it means exactly that.

    Latch waits will be because another process has an incompatible latch already granted (usually, there are other latch waits for other reasons)

    Lock waits will be...

  • RE: Understanding Latches\Locks

    GilaMonster (8/15/2012)


    Latch waits means the process has requested a latch on some structure and is waiting for the latch to be granted

    Lock waits means the process has requested a lock...

Viewing 15 posts - 451 through 465 (of 758 total)