Forum Replies Created

Viewing 15 posts - 1,741 through 1,755 (of 7,613 total)

  • Reply To: Using NOLOCK in UPDATE or DELETE

    MMartin1 wrote:

    I still have to wonder on the appropriate use of NOLOCK. Even if the data does not change in a table, is NOLOCK that much better than a standard...

    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 do I JOIN these records?

    Very similar, but using an OUTER APPLY because you said you used a LEFT JOIN.  OUTER APPLY is like a "LEFT APPLY" and CROSS APPLY is like an "INNER APPLY".

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

  • Reply To: How to move an empty partition on a partitioned table.

    Sorry, I just have to ask: why would logical file name(s_ need to be preserved?  Are they hard-coded in some existing statements?  That seems dangerous, what if files are added...

    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 move an empty partition on a partitioned table.

    I would have thought you could just rename the logical names to end up with the same name.

    Either: rename the original logical file name before you add the new file...

    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 move an empty partition on a partitioned table.

    Hmm, maybe add another file to the filegroup in the new location.

    Then remove the existing file from the filegroup; since the file's empty, you should be able to remove it.

    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 ?

    Columnstore has its own quirks.  For example, every time you SELECT data from the table you'll read roughly 1M rows.  If your processing (almost) always does that anyway, such as...

    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: after remove TDE

    I did give what I think is the reason for the recommendation: to be able to get back to the exact db image is something happens after removing TDE.

    I get...

    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 ?

    columnstore is an alternative to rowstore with page compression.

    Typically you get even better compression with columnstore.

    As to which is best, that depends on the specific situation with that table.

    I'd say...

    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: after remove TDE

    Do you really care that much?  That is, isn't it easier just to take the log backup.

    I think I know the reason: it would be the only way to get...

    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.

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

Viewing 15 posts - 1,741 through 1,755 (of 7,613 total)