Forum Replies Created

Viewing 15 posts - 5,146 through 5,160 (of 49,552 total)

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (7/30/2015)


    GilaMonster (7/30/2015)


    Luis Cazares (7/30/2015)


    NOLOCK hints can be useful to get estimates of certain data.

    Yup. In fact I told some people recently to put nolock onto a bunch 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
  • RE: Select records start with %

    Brian Barkauskas (7/30/2015)


    For this example, why even use LIKE?

    Because LIKE with a trailing wildcard allows for index seeks if there is an appropriate index, whereas LEFT does not.

    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?

    Luis Cazares (7/30/2015)


    NOLOCK hints can be useful to get estimates of certain data.

    Yup. In fact I told some people recently to put nolock onto a bunch of queries. They were...

    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: Update table using CTE or using inner query on same table

    I've already told you what I suggest.

    Write the query in the simplest way possible. If testing shows that there are performance/locking problems, then consider alternate forms and test them.

    As for...

    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: Update table using CTE or using inner query on same table

    Neither.

    UPDATE [dbo].[TL_CST_Locker_Issuance] SET

    [isActive] = 0

    WHERE

    LockerAppFormId = @LockerAppFormId and LockerNumber=@LockerNumber and isActive=1;

    Writing the query in a more...

    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?

    Brandie Tarvin (7/30/2015)


    EDIT: Seriously, can anyone give me a real reason why WITH (NOLOCK) might be functionally necessary for production code?

    Incompetent developers.

    Prior to SQL 2005 there might have been. Since...

    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 does restore log do after the log is restored?

    Runs the recovery process, same as when you restore a database, there's extra time after the data copying portion completes.

    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?

    Alvin Ramard (7/29/2015)


    GilaMonster (7/29/2015)


    Alvin Ramard (7/29/2015)


    GilaMonster (7/29/2015)


    I just love university logic.

    They send my student card by courier. They send request for guest count for grad via SMS and email.

    They send...

    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?

    Alvin Ramard (7/29/2015)


    GilaMonster (7/29/2015)


    I just love university logic.

    They send my student card by courier. They send request for guest count for grad via SMS and email.

    They send the document telling...

    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?

    SQLRNNR (7/29/2015)


    And in breaking news...

    The thread is about to turn 50,000.

    Let the countdown begin.

    Am I missing something? Page header says 49730 posts.

    I know we like countdowns, but counting down 270...

    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 just love university logic.

    They send my student card by courier. They send request for guest count for grad via SMS and email.

    They send the document telling me my final...

    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: T-SQL interview Questions

    abhishek_300 (7/28/2015)


    Thanks Gila monster for your comments .However for interviews people do not ask simple question on SQL hence you are seeing unrealistic example.

    I can ask some very non-simple questions...

    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 records start with %

    Alternately

    LIKE '/% %' ESCAPE '/'

    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 stored procedure that usually runs fast ran for a long time yesterday

    Increase cost threshold

    Identify the queries which are doing parallel scans and tune them.

    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: techniques for ensuring isolated temp table scope?

    Temp tables are local to the session which created them. SQL automatically adds numbers to the name of a temp table to ensure that it is unique, even if several...

    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 - 5,146 through 5,160 (of 49,552 total)