Forum Replies Created

Viewing 15 posts - 13,216 through 13,230 (of 49,552 total)

  • RE: How to debug query

    As for your performance problem (and please in future post different questions in different threads), can you please post the actual execution plan. What you posted was an estimated and...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to debug query

    No useful information in that.

    Edit the job, go to the job step, the advanced tab and configure an output file. If the job fails again, look in the output...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How can I kill ad-hoc or long time running queries, safely?

    Kill no.

    As for how it works, it would take a few pages to explain, so maybe have a read through the entries in BoL (there's a load of information)...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to find and kill Global Variables from tempdb

    No such things as global variables.

    Use the task space usage and session space usage DMVs to identify what's using lots of TempDB and tune the queries so that they don't...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How can I kill ad-hoc or long time running queries, safely?

    Look into using resource governor (not query governor), if you just kill sessions there's a fair chance that the people running them swear, curse and rerun the queries.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: excluding CDC enabled tables during a full backup of db

    Be careful, filegroup backups require that you do have backups of all the filegroups that you intend to restore (and I'm not talking about a dev refresh, more a disaster...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: excluding CDC enabled tables during a full backup of db

    A full backup is always a full backup of the entire DB. You can do things like filegroup backups and have the CDC tables in another filegroup, but that complicated...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Automate new partition creation in table partitioning

    There's a script in the first article that Igor linked, just take the part to create a new partition and ignore the part to switch and merge the partitions since...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Automate new partition creation in table partitioning

    Create a job that runs every year and splits a new partition. It's the same as the sliding window except you're only doing the split partition half, not the switch...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Best method of handling optional parameters in WHERE clause

    Case gives you table/index scans. Very consistent performance, but not good performance once you get to tables with more than a couple hundred rows. The OR method can use index...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Best method of handling optional parameters in WHERE clause

    http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: given a date, tell me how many seconds from 1900

    You're looking for the function datediff, however it'll overflow for a value that far back as datediff returns an int and 1900/01/01 is more than MAXINT seconds ago.

    This works.

    SELECT CAST(datediff(hour,'1900/01/01',GETDATE())...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Possible to use tored proc to kill all queries running longer than 2 hours AND are blocking other queries

    Can you be a bit clearer what you want?

    Kill all the queries that have been running for 2 hours and have been blocking other queries for 2 hours?

    Kill all the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: filtere index benefit

    The index isn't covering and doesn't even support most of the where clause. Unless a very, very, very, very small portion of the table qualifies for that filtered index, it's...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Back up scripts

    Please note: 4 year old thread.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 13,216 through 13,230 (of 49,552 total)