Forum Replies Created

Viewing 15 posts - 42,466 through 42,480 (of 49,552 total)

  • RE: Query Help Please

    Mike Feuti (12/9/2008)


    Not sure if this answers your question or not but I want the email addresses and ID for anyone on any committtee. the ID's are the link...

    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: Are the posted questions getting worse?

    Matt Miller (12/9/2008)


    while (@i<50000)

    BEGIN

    SELECT *

    Into #tempTable

    from MyHumongousTable --1,750,000 rows

    update MyNewTable

    set...

    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 Help Please

    Mike Feuti (12/9/2008)


    O

    --===== Insert the test data into the test table

    INSERT INTO #test

    (ID, email)

    SELECT '10002','Walton@email.chop.edu' UNION ALL

    SELECT '10004','craig.engstrom@wfhc.org' UNION ALL

    SELECT...

    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: Are the posted questions getting worse?

    I still think my favourite has to be this piece of code that I found when one of the devs complained that the dev server was very slow. The same...

    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 Help Please

    Mike Feuti (12/9/2008)


    I think I have what you need now.

    Almost. Just need the create statement for the two temp tables please.

    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 Help Please

    Mike Feuti (12/9/2008)


    Ok I'm fairly new at this but I'm trying.

    That's fine.

    I've edited the data you posted so that it looks the way we generally want it. Do 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
  • RE: Slow function

    pino_daddy (12/9/2008)


    The function is used to convert whatever time is being retrieved from whatever table it is being retrieved from. I was just wondering if there was a better 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: Certain Number of rows before SQL will use an index ?

    TheSQLGuru (12/9/2008)


    1) I wonder if that was actual rows returned or estimated?

    Estimated. The optimiser works with estimated row counts and that's what it uses for its costings and plan....

    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: Slow function

    Grant did say it was untested. There's a misplaced bracket in the dateadd function.

    SELECT s.ROW_ID, DATEADD(MINUTE,ISNULL(x.UTC_OFFSET,0),s.Created)

    FROM S_SRV_REQ S

    LEFT JOIN (SELECT TOP 1 tt.UTC_OFFSET, TT.START_DT

    FROM S_TIMEZONE T

    JOIN S_TIMEZONE_TEMP TT

    ON T.ROW_ID =...

    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: Slow function

    pino_daddy (12/9/2008)


    Want to know how to speed up the function. Rewite it better? Different code for the function, etc.

    Remove it?

    The way that SQL runs UDFs means 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: Reading code of stored procedure

    Grant them view definition on the procedures, or on the entire dbo schema (but that will give them rights to see the definitions of tables, views, functions, etc as well)

    GRANT...

    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 Help Please

    Please post table definitions, sample data and desired output.

    Read this to see the best way to post this to get quick responses. http://www.sqlservercentral.com/articles/Best+Practices/61537/

    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: To Know fragmentation?

    kotlas7 (12/9/2008)


    - Logical Scan Fragmentation ..................: 2.31%

    For an index, that's the most important one. Extent fragmentation is less important but should still be kept low.

    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 Server 2005/2008

    If you have no experience with SQL 2008, then don't write the 2008 exams. They're not that much more difficult than the 2005 ones, but they do require that 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
  • RE: Job fail: The log file for database[DB] is full.

    Debbie Edwards (12/9/2008)


    at the beginning of the script Ive got DBCC SHRINKDATABASE (MyDatabase, 20);

    Why?

    Is the entire job running within a transaction? Logs can only be truncated to the beginning of...

    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 - 42,466 through 42,480 (of 49,552 total)