Forum Replies Created

Viewing 15 posts - 47,116 through 47,130 (of 49,552 total)

  • RE: Querying an indexed table

    rbarryyoung (3/20/2008)


    Gail, my understanding is that, in the abscence of statistics, the optimizer will, having nothing else to go on, order the predicates as they were ordered in the query...

    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 we tune this long ruuning query

    Could you post the definition of cc_message and its indexes (assuming it is a table). Could you also give us an indication of how many rows are in the table...

    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: Temp Table List

    This will get it for you. I don't know if there's a way to tie the name back to the creating SPID though. don't think so.

    SELECT * FROM tempdb..sysobjects WHERE...

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

    Can you post the execution plan for us please (saved as a .sqlplan file, zipped and attached)?

    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 for Top N for large amount of data

    Could you post the table's create script, some sample data and expected output please.

    See here - Forum Etiquette: How to post data/code on a forum to get the best...

    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: SUSPECT DB

    Sure we can help. But first we need to know why the database is suspect. Please have a look in the SQL Server error log. There will very likely 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: Statistics Missing For This Table

    Is it a permanent table you're getting that message for, or a temp table?

    If permanent, check that auto_create_statistics is on for that database

    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: Reg Timestamp Data type

    Timestamp values are unique within a database

    Books Online


    Each database has a counter that is incremented for each insert or update operation that is performed on a table that contains a...

    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: ALTER INDEX failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'.

    From what I remember, there are a number of requirements for indexing computed columns, regardless of what's in the column or what it's called. Similar to the requirements for indexed...

    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: sqlstate 5001 error "There is already an object named PKCURSOR in the database"

    ALTER TABLE #ACCOMPLISHMENTS

    ADD CONSTRAINT PKCURSOR PRIMARY KEY (PROGRAM_YEAR, ACTIVITY_CODE)

    When you create a temp table, SQL server hashes the name so that there'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
  • RE: SELECT WITH NOLOCKS

    GSquared (3/21/2008)


    (There's gotta be a way to test that hypothesis. Time for some research and testing.)

    I can confirm your theory. I've seen (On this forum in fact) a deadlock...

    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: SELECT WITH NOLOCKS

    Jeff Moden (3/21/2008)


    Regardless of what the cause of the deadlock is, I guarantee it's going to be code that has a BEGIN TRAN/COMMIT in it...

    The other place to look...

    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: SELECT WITH NOLOCKS

    Matt Miller (3/20/2008)


    Jeff Moden (3/20/2008)


    No... like I said earlier... WITH (NOLOCK) only affects SELECT's. The following is from Books Online... (or are we talking something different?)

    NOLOCK

    Do not issue...

    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 2000 in suspect mode

    Are there any errors in the error log?

    Without knowing more about why SQL's marked the database suspect, it's impossible to suggest an appropriate course of action.

    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: I/O Error (bad page id)

    Adam Haines (3/21/2008)


    You can also query msdb for suspect pages.

    SELECT * FROM msdb..suspect_pages

    On SQL 2005 only.

    Palwi: Questions related to SQL 2000 should rather go into the sql 2000 forums. Otherwise...

    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 - 47,116 through 47,130 (of 49,552 total)