Forum Replies Created

Viewing 15 posts - 2,146 through 2,160 (of 7,619 total)

  • Reply To: Sql error log

    > we renamed the sql error log out file in agent properties <<

    I think that would require a recycle of SQL Server.  You don't need to do that.  You should...

    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".

  • Reply To: Execution plan flips from "good" to "bad" at a certain threshold

    Try better clustering in a test system somewhere.  You might be pleasantly astounded by the results.

    Table dbo.TSys_Lookup_Date D should almost certainly be clustered first on [Date].

    Try clustering dbo.T_DeliveryTimetableItem and dbo.T_DeliveryTimetableItemResolvedCost...

    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".

  • Reply To: Table Alerts

    Phil Parkin wrote:

    Similar to what Grant mentioned, I'd suggest creating a table to help manage the process. Run a process every day to update the table with the next day's planned...

    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".

  • Reply To: IF IF IF versus IF Condition 1 and condition 2 and condition X

    Eirikur Eiriksson wrote:

    ScottPletcher wrote:

    Eirikur Eiriksson wrote:

    ScottPletcher wrote:

    It's not worth that risk for such a tiny gain. 

    In a single execution, the gain may be small, bring it up to 100K/Sec and that...

    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".

  • Reply To: How to reduce lock or avoid lock while encoding SQL statement

    Waiting for locks is normal in SQL Server (or any other relational db).

    Whether the waits are excessive is a different q.

    Since you've provided no details, to reduce bad effects of...

    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".

  • Reply To: Table Alerts

    You could run the job every minute.  But I'd say run the job every 10 minutes (or, I guess, 5 minutes).  Would it really be that big a deal 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".

  • Reply To: Sql error log

    ramyours2003 wrote:

    We have job which is configured to recycle the sql error log on daily basis

    Are you using the standard sp_cycle_agent_errorlog proc or did you try something home grown? ...

    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".

  • Reply To: IF IF IF versus IF Condition 1 and condition 2 and condition X

    Eirikur Eiriksson wrote:

    ScottPletcher wrote:

    It's not worth that risk for such a tiny gain. 

    In a single execution, the gain may be small, bring it up to 100K/Sec and that difference can...

    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".

  • Reply To: IF IF IF versus IF Condition 1 and condition 2 and condition X

    Eirikur Eiriksson wrote:

    Just a quick thought: Any IF statement will add an evaluation step to the execution Any AND will do the same Conditionals (IFs) introduce branching, even if there is...

    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".

  • Reply To: Addition of values from two fields

    I used a table for the location_id(s) to be combined, so that it would be easy to do multiple combinings.  For example, if you uncomment the (1, 30), you'll see...

    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".

  • Reply To: Using If exists trying to assign the value to a variable when it exists.

    In this specific case, I'd recommend you add a couple of triggers to the table to maintain an accurate flag for this in the parent row.

    You'd need an INSERT trigger...

    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".

  • Reply To: IF IF IF versus IF Condition 1 and condition 2 and condition X

    I agree, the first method is unnecessary.

    As to whether I put all on one line: if they are straightforward, I would code them in one line with ANDs.  If one...

    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".

  • Reply To: IF IF IF versus IF Condition 1 and condition 2 and condition X

    Jeff Moden wrote:

    YSLGuru wrote:

    I really hope this isn't a dumb question. Is there a reason other then style or preference as to why you'd do this:

    IF @Var1 =...

    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".

  • Reply To: Execution plan flips from "good" to "bad" at a certain threshold

    julian.fletcher wrote:

    Unfortunately, we have a bit of a standard, which is that tables called "Thing" have a clustered index on ThingID, which will be an int, identity column. That's because...

    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".

  • Reply To: Execution plan flips from "good" to "bad" at a certain threshold

    julian.fletcher wrote:

    The obvious difference is the number of rows read from the T_DeliveryTimetableItemResolvedCost table, which goes from 20k to 21 million (and a seek to a scan, probably unsurprisingly). The...

    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 - 2,146 through 2,160 (of 7,619 total)