Forum Replies Created

Viewing 15 posts - 6,766 through 6,780 (of 7,619 total)

  • RE: TSQL Optimization - CASTing and CURSOR

    Is CASTing cost an additional overhead to the query?

    In this case, no. In fact, here it might actually help ever so slightly.

    SQL has to determine a datatype 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: Index question

    Are Transaction_Numbers -- i.e. clustered key values -- added in ascending sequence?

    If so, make sure SQL is sorting the rows before doing the INSERTs.

    If not, and you're sure you have...

    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: TempDB questions

    bangsql (2/21/2013)


    1. any query uses group by , order by etc.. uses tempdb.

    so if view contains that tempdb will use

    2. no of physical cpu = no of tempdb files.

    RAM...

    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: TempDB questions

    1) I know temporary tables and table variables occupy space in TempDB, but what happens when I invoke a view; do views also make demands on TempDB?

    2) What is 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".

  • RE: Issue With Update trigger on storeprocedure

    I support the idea of using CONTEXT_INFO for this.

    But I'd suggest limiting the use of it to a single, predefined byte location. And also not destroying any unused in...

    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: Instead of Insert and Insert Trigger

    The "instead of" trigger will fire first.

    If the "instead of" trigger does actually insert a row(s), then the "after[for] trigger" will fire.

    You may want to use the clearer "AFTER INSERT"...

    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: Display on Month and Year from date formula ??

    Jeff Moden (2/19/2013)


    ScottPletcher (2/18/2013)


    Jeff Moden (2/18/2013)


    ScottPletcher (2/18/2013)


    declare @enddate datetime

    set @enddate = getdate()

    SELECT STUFF(CONVERT(varchar(10), DATEADD(DAY, -21, @enddate), 1), 3, 4, '')

    Except for Sean, we did forget to answer the original question....

    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: DWH : Fact table : index creation.

    Jason-299789 (2/19/2013)


    Scott,

    I would disagree with you on the under no circumstances comment, for a couple of reasons

    1) the risk of fragmentation is significant on the clustered index, especially if...

    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: DWH : Fact table : index creation.

    Bhuvnesh (2/18/2013)


    ScottPletcher (2/18/2013)


    Under no circumstances should you cluster this table on Policy_transactional_ID.

    Cluster the table by the most common WHERE conditions; make the clustered key unique by including the Policy_transactional_ID on...

    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: Problem Capturing Constraint Violations Using INSTEAD OF Trigger

    David Moutray (2/18/2013)


    ScottPletcher (2/18/2013)


    All triggers are implicitly part of a transaction, with at least the SQL statement that caused the trigger to fire included in the transaction.

    In implicit transaction mode,...

    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: Waring alters when the database (files MDF, NDF & LDF) reaching the MAX size.

    Ranzz (2/18/2013)


    It cant be possible to set unlimited growth.

    So, that is the reason, I am looking for some thing that will help us.

    It is possible in SQL Server.

    Maybe...

    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: Problem Capturing Constraint Violations Using INSTEAD OF Trigger

    You don't want to issue your own BEGIN TRANSACTION in the trigger, since, as I noted before, you're already in a transaction.

    That error message after the ROLLBACK is normal, 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: Display on Month and Year from date formula ??

    Jeff Moden (2/18/2013)


    ScottPletcher (2/18/2013)


    declare @enddate datetime

    set @enddate = getdate()

    SELECT STUFF(CONVERT(varchar(10), DATEADD(DAY, -21, @enddate), 1), 3, 4, '')

    Except for Sean, we did forget to answer the original question. :blush: Thanks,...

    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: SQL Data warehouse poor performance

    Modest DBA (2/18/2013)


    100% i agree with you, but the thing is also not data loads.

    To curb this, i requested a data count, after every table re-load, and the difference between...

    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: DWH : Fact table : index creation.

    Under no circumstances should you cluster this table on Policy_transactional_ID.

    Cluster the table by the most common WHERE conditions; make the clustered key unique by including the Policy_transactional_ID on the end...

    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 - 6,766 through 6,780 (of 7,619 total)