Forum Replies Created

Viewing 15 posts - 24,301 through 24,315 (of 49,552 total)

  • RE: Use Dynamic SQL in a function? Not working.

    About the only thing you could do is this

    CREATE FUNCTION blah blah blah

    IF @table = 'tbl1'

    select something from tbl1 where ID = @ID

    IF @table = 'tbl2'

    select something from...

    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: Question about Clustered PKs

    Updates that increase the size of the row

    Database or file shrinks.

    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: Use Dynamic SQL in a function? Not working.

    You cannot execute dynamic SQL within a function.

    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: What SQL Server Books Do You Recommend

    Ninja's_RGR'us (8/9/2011)


    SQLRNNR (8/9/2011)


    There are a number of books out there that are worth recommending. To simplify things, I just go straight to a reading list on Amazon provided by...

    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: Interview question

    Backup compression is enterprise only (on 2008)

    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: Sql server 2008 R2 --- procedure Cache

    Are you having performance problems due to the compiles?

    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: Tuning a query

    Update statistics on Products and Transaction with full scan. The estimations are off a bit. See if that changes the plans at all.

    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: File Size, Space used, space left question

    If the file fills, it'll grow. Not having a max size means it's allowed to grow up to 16TB (assuming need and drive space)

    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: Strange behavior with selecting random rows

    No offence, but that'll be a pain in the neck to get into a table. Read this to see the best way to post sample data.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    Also want some rows for...

    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: Will table compression also cause transaction log to be smaller?

    Insert in batches or use an insert method that can be minimally logged (and drop any nonclustered indexes before you start)

    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: Strange behavior with selecting random rows

    And some sample data for the two please (garbage data is fine, not asking for anything confidential)/ Also a bit better description of what you want to happen.

    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: Will table compression also cause transaction log to be smaller?

    Maybe. If you compress the table row and page, what goes into the tran log will be the row-compressed data (not the page compression), but it's not the main point...

    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: Strange behavior with selecting random rows

    Table definitions please. Sample data would be helpful (garbage/test data)

    Where does the randomised data come from?

    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: Strange behavior with selecting random rows

    john-from-ct (8/9/2011)


    It becomes a show-stopper when attempting to update a record and the sub-query returns zero or multiple rows when it should return exactly one...

    where ID =...

    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: SQL DATABASE IN RECOVERY MODE

    srinath.vanama (8/9/2011)


    After shrinking the log i didn't face the problem till date, can u ppl please guide me in my case what to do and what not to do, if...

    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 - 24,301 through 24,315 (of 49,552 total)