Forum Replies Created

Viewing 15 posts - 1,756 through 1,770 (of 7,619 total)

  • Reply To: Isolation level question.

    ONLY if it's actually NEEDED, just because of the overhead to activate it.

    I have (many) hundreds of dbs.  I have RCSI on for about a dozen or so of them. ...

    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: When we insert new data into Compressed table, is it automatically compressed?

    When a page gets full, it is compressed(*), there does not have to be a rebuild first.

    (*) SQL attempts to compress the page; if there's not enough gain from compression,...

    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: Compress the Partitioned OR Partition the Compressed ?

    In general, data compression is a huge performance gain.  Partitioning is not a particular performance if the table has its best possible clustering index, i.e. you lookup by the clus...

    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: Isolation level question.

    This statement:

    ALTER DATABASE [MYDB] SET ALLOW_SNAPSHOT_ISOLATION ON

    causes the db to start snapshot processing -- adding 14 bytes to each row and storing any needed row versions in tempdb -- and...

    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: Calculate durations between dates

     

    SELECT
    issuedate, replydate,
    CASE WHEN replydate IS NULL AND DATEDIFF(DAY, duedate, GETDATE()) > 0
    THEN DATEDIFF(DAY,...

    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: Better Practices for writing this query?

    DECLARE @date1 date
    DECLARE @date2 date

    SELECT ...
    ...
    CROSS APPLY (
    SELECT dbo.fnGetSeconds(@date1) AS date1_secs,
    dbo.fnGetSeconds(@date2) AS date2_secs
    ) AS alias1

    ...

    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: Better Practices for writing this query?

    My preferred approach is to use a CROSS APPLY to assign an alias name to the computation.  That name can then be used in any other clause in the SELECT,...

    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: Space Error

    Should use the new file just fine.  Make sure the new file is present, or you will have no space to write to.

    What's happening is this.  Your file has not...

    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: filter by WHERE has no effect

    Try SELECT too rather than PRINT, since SELECT can show more chars than PRINT.  Also, be sure to adjust the options in SSMS to show the max chars possible.

    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: DATEDIFF() for times over a day long

    Sergiy wrote:

    I

    Jeff Moden wrote:

    ScottPletcher wrote:

    Don't worry about ms, just use seconds.  A few ms diff could be caused by almost anything is and not significant for an SSIS package.

    I have 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: DATEDIFF() for times over a day long

    Don't worry about ms, just use seconds.  A few ms diff could be caused by almost anything is and not significant for an SSIS package.

    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: pagination with case

    An ORDER BY either has an OFFSET clause or it doesn't.  There is no "sometimes it does, sometimes it doesn't".

    In this structure, rather than use 0 for the count, could...

    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: Simple GROUP BY Query

    Sorry, thought I changed it to jma.... (which I'll now do in my orig post as well).  But I'm assuming that such a column exists just because or your comments...

    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: Count Null Records with Group BY

    Seems like the table must be empty.

    Make sure you are in the correct db.

    A long shot, but you should always put the schema name on the table anyway, for performance...

    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: Simple GROUP BY Query

    Here's my best guess at what you're trying to do.

    SELECT 
    JO.jmoJobID, JA.jmaPartID, JO.jmoWorkCenterID,
    JO.jmoProcessID, JO.jmoOperationQuantity,
    ...

    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 - 1,756 through 1,770 (of 7,619 total)