Forum Replies Created

Viewing 15 posts - 48,226 through 48,240 (of 49,552 total)

  • RE: ORDER BY not working as it should

    I don't have your tables handy, so I can't run that query. Maybe this will suffice. Against a SQL 2005 SP2 server

    select name, object_id, type_desc, create_date, create_date

    from sys.objects

    -- Runs fine....

    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: ORDER BY not working as it should

    The order by clause runs after the aliases in the select have been applied. This is most likely undefined behaviour deriving from technically incorrect SQL. Most likely whichever column gets...

    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: Performance problems on Live server

    As an alternative to local variables, I would suggest that you change the procs back to using parameters and mark each proc WITH RECOMPILE.

    With variables you'll get average performance, never...

    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: is there any difference between != and <>

    Jeff Moden (11/13/2007)


    ...and here's your advantage... I don't have 2k5 to play with... I have to do it using only T-SQL 'cause I only have 2k. 😉

    Is not fair then....

    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: Selecting a Column from another table

    With this, you're going to have to resort to dynamic SQL. Build up the statement as a string, then execute it. (sp_executesql)

    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: Query times inconsistent

    The other problem with that is that when the proc compiles, all of the selects compile, based on the values of the parameters for that call. That's even if 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: SHRINKDATABASE Not Working

    Shuffle, shuffle, shuffle the pages... I wrote a post about this, after encountering way too many people shrinking databases for no good reason. (http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/%5B/url%5D) I've had an uphill battle with...

    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: performance and compatable mode

    Do you mean compatability mode? (80,90,...)?

    I doubt it will. All the compat mode does is enable of disable the new features. It does not make the server behave like an...

    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: impact of "permanent" sql trace on production server?

    Mark Manis (11/9/2007)


    I guess there are mixed opinions of this out there, because another DBA told me this was the preferred method and it seems to work well for me.

    There'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: is there any difference between != and <>

    Jeff Moden (11/9/2007)


    Heh... good point. But have had this argument with many other folks... there's very little you will ever need a CLR for if you actually know T-SQL...

    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: Table locks resulting from trigger

    You can use profiler to capture the insert statements, and also to check is the app is doing a begin transaction before the insert and when/if it is doing 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: UPDATA STATISTICS

    -- For SQL 2005

    SELECT STATS_DATE(object_id, index_id), object_name(object_id)

    from sys.indexes where object_id = object_id('TableNameHere')

    Edit: Just noticed your on SQL 2000....

    Not exactly the same, cause of the changes to the system...

    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: Regarding triggers on a table

    Look up sp_helptrigger in Books Online

    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: impact of "permanent" sql trace on production server?

    emamet (11/9/2007)


    Yes, I was planning to select very few events and columns as well as putting a filter on duration.

    When you set up your filter, remember that durations are measures...

    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: impact of "permanent" sql trace on production server?

    Agreed. Don't use the profiler GUI when tracing against production servers. The server-side trace procs are a much better idea.

    Basically, you don't want to be sending the trace info across...

    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 - 48,226 through 48,240 (of 49,552 total)