Forum Replies Created

Viewing 15 posts - 35,836 through 35,850 (of 49,552 total)

  • RE: Count(*)

    Jeff Moden (11/14/2009)


    Don't use that method (sysindexes) even in SQL Server 2000 because there is no guarantee that the value you get back is accurate unless you also run DBCC...

    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: role permission of tempdb due to server restart

    chirag.vyas (11/13/2009)


    in our application that need to create some tables in tempdb.

    Why? That's generally a very bad idea

    1. Is there any setting to ensure that the the db_owner role...

    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: Deadlock Information in Profiler (ObjectID2 way too large)

    It's not an objectid, it's a partitionid. Query sys.partitions to get the objectid and indexid

    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 Tuning where no PK exists

    SQLNewbster (11/13/2009)


    Umm, sorry. I didn't realize this was the SQL 2k forum. I just joined when I posted this. Many apologies for that.

    No worries. We just 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: reorganise/rebuilt index online script needed...........

    CirquedeSQLeil (11/13/2009)


    Keep in mind that an online Rebuild is available in SQL2K5 Enterprise.

    Plus indexes with LOB columns can't be rebuilt 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: Count(*)

    Francis Yee-483501 (11/13/2009)


    Is there any other cases that if I use MAX(rows) for the same tablename I would not get the rowcount ?

    Yes. Any partitioned table.

    Consider a table with 2...

    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: Restoring file groups problem... LOG backup lost...

    ryan.mcatee (11/13/2009)


    Surely it must be possible. In a real-world scenario (which thankfully this is only some concept testing), backing up the tail of the t-log may not always be...

    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: Restoring file groups problem... LOG backup lost...

    You need to now go and restore all your log backups, starting with the one after the earliest of the filegroup backups and ending with the one you took right...

    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: reorganise/rebuilt index online script needed...........

    espanolanthony (11/13/2009)


    i nhave a script here that was given by a friend but still when run is it creates locks. he told me that this script will rebuild/reorganise indexes 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: SQL Tuning where no PK exists

    SQLNewbster (11/13/2009)


    Just so you guys don't go too far off track, I am working in a SQL 2k5 environment, not 2k...

    Then why did you post in a SQL 2000 forum?

    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: Minor Error during Insert

    To add to that, object_id is an int, not an nchar(100). You're wasting nearly 200 bytes of space per row with that. (4 bytes vs 200)

    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 Tuning where no PK exists

    Jeff Moden (11/13/2009)


    Gail, since this is 2k, do you think a partitioned view would help at all here? Or would it just muck things up?

    Haven't worked much with them,...

    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 anyother way to eliminate the BOOKMARK LOOKUP , a part from changing the Indexes

    John Paul-702936 (11/13/2009)


    can you please tell How can i use Forcing index ...

    Look up table hints in SQL's Books Online.

    Sure you want to do that? Are you 100% certain...

    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: Introduction to Indexes: Part 2 – The clustered index

    Then we are going to have to agree to disagree on this. I understand your approach and I've used it before but in general I prefer the one that 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: Count(*)

    CirquedeSQLeil (11/13/2009)


    Option 2:

    Select OBJECT_NAME(object_id) as TableName,SUM(rows) as NumRows,index_id

    From sys.partitions p

    Inner Join sys.sysobjects o

    on p.object_id = o.id

    Where index_id in (0,1)

    And o.type = 'U'

    Group By object_id,index_id

    Order By NumRows Desc

    Don't use sysobjects. 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

Viewing 15 posts - 35,836 through 35,850 (of 49,552 total)