Forum Replies Created

Viewing 15 posts - 48,106 through 48,120 (of 49,552 total)

  • RE: huge performance issue with a view

    Do you have the definition of the following 2 views?

    Comp.dbo.vwRestrictedPPP

    Comp.dbo.vwLehmanPCAggSectorsByCusip

    I'll second the dislike of the top and order by. Ordering should only be done in the final select statement...

    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 Need Full Info of MCTS(70-431) exam,Please give me Tutorial and Hints.

    Necrox (12/5/2007)


    Now i will try the 70-441 and 70-442 to be MCITP database developer.

    I found those quite a bit harder than 431. They're in a case study format and some...

    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: When to update index statistics

    It is strongly recommended to update all stats after moving a db from SQL 2000 to SQL 2005. 2005 keeps more detailed statistics than 2000 did. The 2005 optimiser can...

    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: Selecting row with max date from table with multiple rows

    Without table schema, sample data or required output, I'm taking a guess here.

    SELECT A_Table.A_Acct, B, C, D....W, A_Date

    FROM A_Table inner join

    (SELECT A_Acct, MAX(A_Date) as LatestDate

    ...

    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: PERFORMANCE QUESTION

    Ananth (12/5/2007)


    My suggestions:-

    1) check the index in the table i.e your query should perform index seek and scan while executing the query.

    Seeks preferably, as few scans as possible.

    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: low performance

    Could be out of date statistics or fragmented indexes. Is there any blocking? If you look at the sys.dm_exec_requests, can you see if the query is waiting for anything? If...

    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: PERFORMANCE QUESTION

    Since they're interview questions, I'm not going into great detail. You can research more yourself

    irfan.sql (12/4/2007)


    1}You created a query/store proc and the output result was in 1 2 second's everything...

    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 design on a table where the primary key is not clustered

    noeld (12/4/2007)


    You don't have to be an SQL Server Ranger to know that there is something terribly wrong with 34 indexes in one table.

    I've seen worse. 38 indexes on one...

    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: Cross Join

    Thanks. Will check.

    I do disagree with that summary though. I've seen many, many cases where the filter (where) is applied before the join.

    Looking at that, it does say 'logical phases'...

    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 don't want SQL Server to order the data

    Or add a column on the excel spreadsheet that gives the question order, import that column and order by that.

    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 don't want SQL Server to order the data

    Piotr Rodak (12/4/2007)


    There is something not right with the database logic, when it depends on physical order of data.

    It doesn't. In SQL physical order of data is completely irrelivent....

    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: Cross Join

    Do you have chapter and page? I have the book at home. I'll check it out tonight.

    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: Cross Join

    Ramesh (12/4/2007)


    Amazingly, SQL Query Processor performs a Cartesian product (a cross join, or an unrestricted join) between the first two tables that appear in the FROM clause, and as 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: I don't want SQL Server to order the data

    Alexandru Petre Ionescu (12/4/2007)


    insert into dbo.Questions

    (FormID,QuestionTitle, QuestionText, AnswerType,LevelID)

    select distinct FormID,QuestionTitle,QuestionText,QuestionType,LevelID

    from dbo.MapFile

    The "select distinct" is ordering data on the "FormID" field wich is not good to me.

    The order applied on...

    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 tables VS variable tables ????

    vyas (12/4/2007)


    Table variables require less locking and logging resources than temporary tables, so table variables should be used whenever possible.

    Not always.

    Table variables cannot have indexes on them (other than 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

Viewing 15 posts - 48,106 through 48,120 (of 49,552 total)