Forum Replies Created

Viewing 15 posts - 6,421 through 6,435 (of 49,552 total)

  • RE: Prevent Windows admin from querying a Database

    You can ensure that the administrator doesn't have a login to SQL, that the Administrators group isn't added as a SQL login (shouldn't be), the domain admins group is not...

    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: trying to rewrite a "NOT EXISTS" query to use "JOIN" 's

    However it's worth noting that: http://sqlinthewild.co.za/index.php/2010/03/23/left-outer-join-vs-not-exists/

    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 get latest records from the below table

    Since that table has nothing to indicate any order of insert (eg dateinserted), there's no way to tell what the latest rows are (tables are unordered sets of rows). 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: Moving tables to new file group

    Igor Micev (3/16/2015)


    wak_no1 (3/16/2015)


    Thanks for the reply.

    Why shouldn't I drop the clustered indexes? - they're not needed (hence why non exist), as they're only needed for the move.

    You can use...

    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: Moving tables to new file group

    SQL Guy 1 (3/16/2015)


    When creating clustered indexes, you can add page level compression.

    Which is not necessarily a good thing (can massively increase CPU usage). You can compress a heap...

    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: Moving tables to new file group

    Table doesn't have clustered index != table doesn't need clustered index

    All (almost all) tables should have a clustered index as that's what the storage engine is designed around. That 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: IN vs EXISTS

    EdVassie (3/16/2015)


    a) is obviously the EXIST check and b) is the IN check.

    Except it isn't. They behave and perform identically in most cases, see the blog post referenced above.

    b)...

    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 create a check constraint where another table column value is also involved

    roger.price-1150775 (3/16/2015)


    Triggers might help but could be complex. You would need triggers on both tables to manage/control changes to either table.

    Yes, it would. In a situation like this I'd take...

    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: Moving tables to new file group

    wak_no1 (3/16/2015)


    Hi

    I'm presented with an issue where by I need to reclaim a fair bit of unused space currently sat in the primary data file for my database. I 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: SQL choosing to use the worst possible index

    It's not a bug.

    A bug is a behaviour that is contrary to the way the software was designed to work. What you're seeing is a fully expected (and documented) behaviour...

    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 choosing to use the worst possible index

    If they're local variables, it's what Grant said. SQL can't sniff the values and so probably has an incorrect row estimation, one where it thinks that the index it's choosing...

    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: Never Shrink a Database?

    dan-572483 (3/11/2015)


    Two messages up GilaMonster describes a scheduled shrink job she has on a dev server.

    Emphasis *dev* server (it's mostly there because the developers have a habit...

    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: The Worst Comments

    Gary Varga (3/16/2015)


    Phil Parkin (3/16/2015)


    GilaMonster (3/16/2015)


    The worst comment I've ever seen (as opposed to one I wrote) was in MS Access. The previous developer had written a lot of profanity-filled...

    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: The Worst Comments

    The worst comment I've ever seen (as opposed to one I wrote) was in MS Access. The previous developer had written a lot of profanity-filled comments. Anyone who's worked 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: How to create a check constraint where another table column value is also involved

    A function will do it, but it can't be trusted because the check constraint on table A won't get checked if the column in table B changes and hence you...

    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 - 6,421 through 6,435 (of 49,552 total)