Forum Replies Created

Viewing 15 posts - 46,471 through 46,485 (of 49,552 total)

  • RE: Data not comitting ?

    Indeed. Is most intriguing...

    Personally, I'm thinking that an instead of trigger might be a better idea, as it allows the insert to not actually be run, removing the need...

    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: Parallel file operations

    TheSQLGuru (5/20/2008)


    Fixing poorly written queries and finding indexing opportunities will almost certainly provide WAY more benefit than worrying about how many files to use in a file group. 🙂

    QFT.

    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 procedure not fully working

    Altering a procedure automatically invalidates its cached plan.

    Check to make sure you don't have 2 versions, one in the dbo schema and one in a different schema

    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: stored proc taking too long!

    Methinks you're going too complex

    CREATE TABLE #tempFileName (

    FileNumber INT IDENTITY,

    FileName varchar(50)

    )

    INSERT INTO #TempFileName (FileName)

    SELECT DISTINCT Filename FROM #Temp

    UPDATE #Temp

    SET FileNumber = #tempFileName.FileNumber

    FROM #tempFileName WHERE #tempFileName.FileName =...

    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: stored proc taking too long!

    Johann, have you come right?

    If not, please post some code that reproduces the problem (complete with table creation script and inserts for sample data) and I'll see if 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: tempdb Filegroup and Files

    In SQL Server, unless you specify an order by, the order of rows returned is not guaranteed. You've just been lucky up until now.

    I would suggest, any time you need...

    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: Accumulate Values

    There's an excellent article by Jeff Moden on running totals. You'll find it in the articles section here.

    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: Data not comitting ?

    Actually, I just noticed this little gem...

    ALTER TRIGGER [dbo].[trg_UpdateProcessedData]

    ON [dbo].[ProcessedData]

    AFTER INSERT

    ....

    DELETE ProcessedData

    WHERE HistoryID IN (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: Integrity checks only check system databases

    Are you using a maintenance plan? I beleive in a maint plan you can specify system databases only, user databases only or all databases.

    If it's set to all, is 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: stored proc taking too long!

    It shouldn't. Rownumber starts at 1, regardless of how many times you run it. It's the row numbers for the current query, nothing more. Each time the partition columns changes...

    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: stored proc taking too long!

    Sandy (5/20/2008)


    I also wants to learn Sql server 2005.......:hehe:..lolz

    Cheers!

    Sandy.

    Books Online is a good place to start.

    Johann, I could probably shave a couple more seconds off with proper indexing. In case...

    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: stored proc taking too long!

    ROW_Number is a built-in ranking function that's new in SQL 2005.

    the order by clause in it specifies which column or columns define the order for the row number

    The partition...

    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: Data not comitting ?

    Do the tables BIS.History, BIS.[999] and ProcessedData all exist?

    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: Table Scan vs Index

    Put useful indexes on the table and remove the functions in the where clause.

    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: stored proc taking too long!

    Sweet. Then this should do the update for you

    UPDATE #temp SET [Order] = TheOrder

    FROM (SELECT ID, ROW_NUMBER() OVER (PARTITION BY projectID, langCode ORDER BY projectID, langCode) AS TheOrder

    FROM #temp) Sub...

    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 - 46,471 through 46,485 (of 49,552 total)