Forum Replies Created

Viewing 15 posts - 1,441 through 1,455 (of 5,843 total)

  • RE: Please help with code improvements

    1) We need create table script and sample data to help with a query.

    2) Why use integers for what looks to be a Boolean (isDay)? VERY inefficient data type choice...

  • RE: Transaction log not clearing at Checkpoint

    1) are you SURE it is in SIMPLE recovery mode?

    2) I think it won't clear until reaches end of current VLF.

    3)

    SELECT log_reuse_wait_desc

    FROM sys.databases

    WHERE name = 'MyDB';

    4) Long-running...

  • RE: Table Usage Report

    1) I bet some third party systems can do this.

    2) It is VERY easy to roll you own historical trending by just putting your results into a permanent table. HIGHLY...

  • RE: Stored Procedure with conditional IF statement logic (Please Help)

    Eric M Russell (8/12/2015)


    TheSQLGuru (8/9/2015)


    ...

    There are many other CRUD generators out there too, including free options. SSMS can do it even, albeit one at a time.

    Where is this feature...

  • RE: Logshipping

    atulyan.aries (8/10/2015)


    I created this in standby/readonly.. but its changed to standby/ singleuser/ readonly..

    how to do i check who/how was this change done

    I do not believe it is tracked, so there...

  • RE: Stored Procedure with conditional IF statement logic (Please Help)

    redmittens7 (8/10/2015)


    Just curious, but what does "google-fu" mean in your response?

    It means learn how to use online search tools such as Google, Bing, etc.

  • RE: Logshipping

    Standby mode in log shipping is a very nice feature that allows you to run read-only workloads from the log-shipped secondary. Someone set it manually or much more likely it...

  • RE: Stored Procedure with conditional IF statement logic (Please Help)

    Do NOT do what you want to do!! Here is a Guruism: slapping together code quickly is BAD, often for multiple reasons. Plus you will be creating a maintenance/troubleshooting nightmare....

  • RE: Execution Plan and Performance

    Data distribution, statistics staleness, bad cached plan, just plain a lot of data hit/returned, etc.

    I would almost ALWAYS run such queries with OPTION (RECOMPILE) to ensure you get best possible...

  • RE: Best way to maintain indexes when AlwaysON is in place

    ricardo_chicas (8/6/2015)


    as an update the sort in tempdb didn't work...

    The latency between the primary and secondary replica (synchronous) is only 5ms

    I am at a loss here, not sure what else...

  • RE: Tuning a Stored Procedure

    MANY things can cause those est/actual row count differences: table vars, UDFs, functions around columns in where, stuff inside views, mis-matched column data types in joins, mismatched datatypes in parameters...

  • RE: Tuning a Stored Procedure

    1) I see vw..., indicating likely views. Lord only knows what those have in them

    2) Table variables should be replaced with temp tables

    3) Someone got rid of the silly cursor

    4)...

  • RE: Tuning a Stored Procedure

    I took a quick review of the sproc. I lost count of the things that are suboptimal in it, and that doesn't take into account anything about the data structures...

  • RE: Best way to maintain indexes when AlwaysON is in place

    I pretty much always prefer the sort in tempdb option when tempdb will support the size and load of the operation.

    You have done monitoring and proved that the tlog...

  • RE: Best way to maintain indexes when AlwaysON is in place

    ricardo_chicas (8/4/2015)


    This is not in production yet so I was testing the maintenance jobs, the replicas are getting the logs properly and on regular use the backup strategy is able...

Viewing 15 posts - 1,441 through 1,455 (of 5,843 total)