Forum Replies Created

Viewing 15 posts - 18,841 through 18,855 (of 49,552 total)

  • RE: Disk space when varchar to nvarchar change

    Eugene Elutin (4/24/2012)


    nvarchar [ ( n | max ) ]

    Variable-length Unicode string data. n defines the string length and can be a value from 1 through 4,000. max indicates...

    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 from dm_db_index_physical_stats

    What more is there to say?

    Index 1 is the clustered index, the actual data pages are at the leaf level (review Books Online the definition of the clustered index) As...

    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 from dm_db_index_physical_stats

    It's the size of that particular object, so the entry for index id 1 will show the size of the table (because that's the clustered index), the entry for 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: Need help to understand index

    mak101 (4/23/2012)


    How do I use table-valued UDFs instead of scalar-valued UDF? Can you please show me in my query.

    Lynn already did.

    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: Need help to understand index

    No, it's not.

    If you're on SQL 2008 SP2 or above, you can use OPTION(RECOMPILE) (assuming that's allowed in a function), but in a scalar function that could also have nasty...

    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: Do TDE certificates expire?

    Yes. Database mirroring is one of the only cases where the expiry date of the certificate is honoured.

    http://www.sqlsoldier.com/wp/sqlserver/top5mythsofdatabasemirroring

    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: Alternative option to UNION ALL

    Why do you want to replace the union all then? For concatenating multiple tables, there isn't usually a faster way.

    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: Lets talk about memory, and a very simple question... "how much do I need"

    LAW1143 (4/23/2012)


    one other more specific question... I've spoken with MSFE's who state that PLE is the one-stop-shop go-to memory metric, and it shouldnt hover below 300.

    To be completely blunt, anyone...

    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: Lets talk about memory, and a very simple question... "how much do I need"

    http://www.sqlskills.com/blogs/jonathan/post/How-much-memory-does-my-SQL-Server-actually-need.aspx

    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: DBCC CHECKDB returned errors

    gmamata7 (4/23/2012)


    Is there any other logs I can look for IO errors?

    RAID array or SAN

    and this database was restored 3 days ago from a backup file (provided by 3rd party)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: Need help to understand index

    Lynn Pettis (4/23/2012)


    Sometimes, however, using a function makes sense when the same code is used in multiple queries as it makes it easier to localize changes.

    Providing it's an inline...

    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: Need help to understand index

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

    To improve that further, take the UDFs out and do all the work in a single query. Data-accessing scalar UDFs are about the worst thing that you can do in...

    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: DBCC CHECKDB returned errors

    gmamata7 (4/23/2012)


    There are NO IO errors.

    Yes there are, somewhere.

    It is a QA database and in simple recovery model. I can restore it from the good backup.

    That's good at least

    But I...

    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: Can you log the stored Procedure where an action occurred from a trigger?

    GSquared (4/23/2012)


    GilaMonster (4/23/2012)


    You can use SET CONTEXT_INFO and CONTEXT_INFO(), but it requires changing every single procedure

    And will skip if someone does an ad hoc Update script, or 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
  • RE: DBCC CHECKDB returned errors

    You've got one LOB page (large Object) in the table fw_testcase_detail_tcd that's damaged and unreadable.

    When did the corruption occur and do you have a clean backup from before that time?

    Also,...

    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 - 18,841 through 18,855 (of 49,552 total)