Forum Replies Created

Viewing 15 posts - 3,991 through 4,005 (of 7,610 total)

  • RE: Size of sys.allocation_units.used_pages

    You should use "total_pages" rather than "used_pages" because the table may currently take up more space, sometimes a lot more space, than it is actually using.

    For example, a...

  • RE: Should this take hours?

    I suggest reviewing the overall index definitions and stats on the table.  Perhaps even the clustering index needs changed to get the best overall performance.  If the clus index does...

  • RE: BCP issues ...

    SQL 2005 doesn't have a time data type.  It looks like one of your columns in SQL 2012 is time.  That may cause a conversion problem unless you explicitly adjust...

  • RE: multiple small indexes or large covering

    There are times when multiple, narrower indexes would overall perform better.  But that's more difficult to accurately determine and code for.  You must also continue to monitor it, because adding...

  • RE: Initial size for TempDb data and Log file?

    chuck.hamilton (1/10/2017)


    That's simply not true. An instance will not hang because you filled the tempdb database. Queries will fail and the instance will throw errors like 1105, but it most...

  • RE: Queries over HAG instances, SQL 2012

    In old-style SQL, outside of HAG, you could use OPENROWSET to reach a remote server without having to create a linked server. That may or may not work in...

  • RE: multiple small indexes or large covering

    I specialize in tuning, particularly index tuning, and I tend strongly toward the larger, shared index rather than separate indexes. Be aware that if the index needs scanned, multiple...

  • RE: Initial size for TempDb data and Log file?

    Never disable autogrowth on tempdb -- it could bring the entire instance to a waiting state. Instead, put alert(s) into place to make sure you are made aware if/when...

  • RE: replace CASE statement with a table

    I'd suggest an inline-table-valued-function. That will give you performance, reusability and flexibility.

    Although I can't see that CASE statement ever affecting the query plan, unless the result of the CASE...

  • RE: timeout issue

    Is there already a clustered index on the table?

    If not, and ID is an identity value, are you sure it's best to cluster the table on ID?? What do...

  • RE: Performance tuning for a query

    I agree that the join hints should only be used if you truly understand them.

    The critical thing would seem to be that "T3" should almost certainly be clustered on (...

  • RE: Restoration takes too long

    Also, look at the size of the log file in the original db. When you restore, the entire log file must be pre-formatted (even if IFI is on --...

  • RE: Create incrementing group numbers for groups of 500 rows?!

    I think the batch number would be:

    1 + ((row_number() over (order by custnum) - 1) / 500)

  • RE: How to parse numbers out of text string

    Maybe something like this?:

    select textid, textline,

    SUBSTRING(textline, percent_byte - length_of_percent + 1, length_of_percent) as percent_amount

    from #T

    cross apply (

    select...

  • RE: Using Large Integer Or GUID Vs Using Small Integers For Primary Key

    Jeff Moden (12/28/2016)


    ScottPletcher (12/28/2016)


    Then you encode the actual BankAccount value into a related int, as I stated above. That value initially could be gotten from an identity column in...

Viewing 15 posts - 3,991 through 4,005 (of 7,610 total)