Forum Replies Created

Viewing 15 posts - 35,416 through 35,430 (of 49,552 total)

  • RE: A query

    Seth Delconte (12/8/2009)


    A clustered index is the most efficient type of index, since the index is at the leaf level of the data pages

    I'm going to disagree with you there....

    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: Index

    Sure. Query sys.indexes (sysindexes on SQL 2000) and filter by object_id (id on SQL 2000)

    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: A query

    Bru Medishetty (12/8/2009)


    By default when a PK is created, a Clustered Index is automatically created on that table with the PK being the Clustered index Key.

    Providing there isn't already...

    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 immediately pegs out 24 cores to 100% can someone explain to me why?

    Bru Medishetty (12/8/2009)


    Gail, I have never worked on such a query with leading wildcards on a varchar(255) column and 13 Million records.

    As this is something I can't simulate 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: SP Error

    SQLRookie 6502 (12/8/2009)


    So. Can anyone figure this out? Cuz I'm locked.

    Sure. A very quick find shows that you're calling the proc from within the proc, but calling it with 17...

    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: Adding a column to view

    rahulsony111 (12/8/2009)


    I am seeing online and writing those queries, even i am testing them but i am getting errors.

    I am just asking if anyone knows correct syntax.

    Sure, I know 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: Clustered Index Seek Causing Poor Performance - Suggestions For Indexes

    See this article for how top save and post an execution plan. A picture of it is not that useful.

    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    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 immediately pegs out 24 cores to 100% can someone explain to me why?

    That query has to run as a table or index scan, since any predicate with leading wildcards is not SARGable. Since scans can be paralleled, SQL does so, splitting 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: Adding a column to view

    Msg 102, Level 15, State 1, Line 2

    Incorrect syntax near 'DEFAULT 0'.

    Msg 111, Level 15, State 1, Line 4

    'ALTER VIEW' must be the first statement in a query batch.

    Msg 102,...

    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: Adding a column to view

    rahulsony111 (12/8/2009)


    ALTER TABLE DWT00050_IMC_CCYYMM_FACT

    ADD COLUMN CONTRB_DISTB_FLG char(1) {SET DEFAULT 'N'}

    Nope. Invalid syntax there. Check Books Online for the syntax of an ALTER TABLE ADD ... statement

    ALTER VIEW view_name

    ("column 1", "col...

    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: Weird deadlock (key locks) when updating different rows

    Switch traceflag 1222 on. That will result in a deadlock graph been written to the error log every time a deadlock occurs. Post the result of that graph here.

    DBCC TRACEON(1222,-1)

    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 is the difference?

    On SQL 2005 they are both backward compatibility views, are deprecated and should not be used any longer. The replacements are sys.sql_logins and sys.server_principals

    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: Logins backup

    So you're doing SQL backups (creating .bak files) for all the system and user databases?

    If you have, then restoring all of those (restore database) will get the logins and data...

    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: Advice on Shrinkfile/shrinkdb

    Ian Ritchie (12/8/2009)


    I'd just like to know whether there is any overhead caused by the additional whitespace when it comes to transactions

    Nope. No overhead due to empty space inside 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: Logins backup

    Wait a minute... How are you backing up these databases?

    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,416 through 35,430 (of 49,552 total)