Forum Replies Created

Viewing 15 posts - 61 through 75 (of 6,831 total)

  • Reply To: Alter Huge Table

    ScottPletcher wrote:

    ScottPletcher wrote:

    Jeff Moden wrote:

    Apologies on the mistake about COMPRESS.

    I know you think that 2016 is magic after the first insert.  The documentation says that new pages will be minimally logged. ...

  • Reply To: Alter Huge Table

    ScottPletcher wrote:

    Jeff Moden wrote:

    Apologies on the mistake about COMPRESS.

    I know you think that 2016 is magic after the first insert.  The documentation says that new pages will be minimally logged.  I'll...

  • Reply To: Alter Huge Table

    Jeff Moden wrote:

    Apologies on the mistake about COMPRESS.

    I know you think that 2016 is magic after the first insert.  The documentation says that new pages will be minimally logged.  I'll have...

  • Reply To: Alter Huge Table

    Jeff Moden wrote:

    Using a loop to break things up into sections will cause the every section except the first to be FULLY LOGGED, which takes as much as 3 times longer...

  • Reply To: Alter Huge Table

    Ooh, I accidentally left off one critical pre-step:

    (0) Pre-allocate enough log space to handle the INSERTs.  How much total log space you'll need depends on whether minimal logging is available...

  • Reply To: Can an Index improve tempdb high usage ?

    If none of your tables have indexes, you should start there, and fast!

    First, review the missing index stats to see which column(s) should be used in the clustered index.  That...

  • Reply To: Alter Huge Table

    You could also consider using a brand new filegroup, with at least two files, for the new/replacement table, which will reduce any interference with other filegroups.  Then again, you're stuck...

  • Reply To: Database Log File

    Not that I know of.

    You could increase the log size to match the size it was originally if you wanted to.  That may take some time as log space must...

  • Reply To: Alter Huge Table

    I'll assume that when you refer to "primary index" on the original table you mean "clustering index".  That is critical for copying the data (whereas a (nonclustered) primary key is...

  • Reply To: Iterate and reorganize subset of database tables

    Why are using this setting: SORT_IN_TEMPDB = OFF?

    That's generally a very bad idea overall, esp. for larger indexes.

     

  • Reply To: SQL help with Pivot

    I would think you'd want the last Response rather than just picking one seemingly at random (as in your results) or the value that happened to be the MAX one...

  • Reply To: Looking for some guidance on avoiding Scalar UDFs for DB lookups

    You should get rid of the local variable as it's not needed and causes overhead.  Also, make sure that ANSI_NULLS and QUOTED_IDENTIFIER are set properly when the function is created.

  • Reply To: Looking for some guidance on avoiding Scalar UDFs for DB lookups

    If you have 200 entries, at least use a form of binary search rather than searching sequentially thru the list.  Even better would be just looking it up in a...

  • Reply To: Fill missing rows in dataset

    ;WITH cte_distinct_customer_regions AS (
    SELECT DISTINCT Customer_Key, Customer_Name, Component, Region
    FROM Fill_Gaps
    )

    SELECT
    cdc.Customer_Key, cdc.Customer_Name, cdc.Component, cdc.Region,
    ...
  • Reply To: Transactions names meaning In Transaction Logs

    SQL Server has a system view, sys.dm_db_file_space_usage.  In that view is column modified_extent_page_count, which tells how many db pages have been modified since the last full db backup.  If you...

Viewing 15 posts - 61 through 75 (of 6,831 total)