Forum Replies Created

Viewing 15 posts - 3,871 through 3,885 (of 7,613 total)

  • RE: fill factor with clustered PK on identity PLUS another column

    Indianrock - Wednesday, March 29, 2017 5:33 PM

    ok, can some of this be commented out?

    MAX(ds.ItemNumber) AS Equality#
      FROM #index_missing
      CROSS...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: fill factor with clustered PK on identity PLUS another column

    A few critical tables would be a good start, particularly large child tables that are currently clustered on an identity column.

    Edit: Be sure to include any "missing index"...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: fill factor with clustered PK on identity PLUS another column

    Indianrock - Wednesday, March 29, 2017 1:59 PM

    This change didn't remove the error       I see there are two indexes...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: fill factor with clustered PK on identity PLUS another column

    DesNorton - Wednesday, March 29, 2017 1:36 PM

    ScottPletcher - Wednesday, March 29, 2017 11:40 AM

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Last period calculation using existing variable


    DECLARE @Begin_Period int;
    DECLARE @Last_Period int;

    SET @Begin_Period = 201712;
    SET @Last_Period = CASE WHEN @Begin_Period % 100 < 12 THEN @Begin_Period + 1 ELSE @Begin_Period...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: fill factor with clustered PK on identity PLUS another column

    Indianrock - Wednesday, March 29, 2017 11:12 AM

    I'm looking for the problem.  Changing the 3 declared variables from smallint to int didn't...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: fill factor with clustered PK on identity PLUS another column

    Ed Wagner - Wednesday, March 29, 2017 6:11 AM

    If your CI has the ClientID as the first key column and values for...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: fill factor with clustered PK on identity PLUS another column

    The code below will produce two result sets.  The first is missing index stats/info.  The second is existing index stats/info.  We combine the two -- and often other needed...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: trigger that fires on updates NOT from application

    SQLRNNR - Wednesday, March 29, 2017 1:25 AM

    ScottPletcher - Tuesday, March 28, 2017 12:31 PM

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Best practice

    jmcnorrill - Tuesday, March 28, 2017 3:18 PM

    ScottPletcher - Tuesday, March 28, 2017 3:12 PM

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Best practice

    Another option could be to use a static view that is dynamically generated for the formulas.  When a formula(s) change, the view is regenerated.  Just an idea.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: fill factor with clustered PK on identity PLUS another column

    The first focus should be on getting the best clustered index on all (significant) tables.  That is the single most critical performance factor for most tables.  Hint: This is most...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Best practice

    Looks rather straightforward, since the detail table already contains the Position the person was in on that given day.

    If  you could post useable sample data -- CREATE TABLE...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: trigger that fires on updates NOT from application

    The trigger would still fire, but you could have it immediately exit.  The easiest way is likely using CONTEXT_INFO.  Have the app set the first two bytes of it to...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: fill factor with clustered PK on identity PLUS another column

    Most of our tables have a clustered PK on an integer identity column.

    Common, but not the best.  You'll hurt your overall performance significantly this way.

    These...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 3,871 through 3,885 (of 7,613 total)