Forum Replies Created

Viewing 15 posts - 181 through 195 (of 207 total)

  • RE: varchar actual size

    Grant Fritchey (12/31/2008)


    Even though SQL Server 2005/2008 will store excess values past the 8060 limit when dealing with varchar,etc., you will get performance overhead to go and do that extra...

  • RE: getting all records between 2 fridays of a given date

    And Jeff's post is better formatted also 😛

  • RE: varchar actual size

    Jeff Moden (12/30/2008)


    Jeffrey meant that if you give room for a mistake to happen, it will happen. You shouldn't make VARCHAR any bigger than necessary or you stand a...

  • RE: varchar actual size

    klini (12/30/2008)


    Thanks.

    I've meticulously tried to get my varchars to match what I expect the data to look like. I'll now just set everything to 8000 and save myself a...

  • RE: varchar actual size

    Piotr Rodak (12/30/2008)


    RBarryYoung (12/30/2008)


    Varchars only store that space that you are actually using.

    + 2 bytes to store the length of data;)

    P.

    Also don't forget that if you have other columns or...

  • RE: Semi joins

    OK, now I'm slightly confused. It actually looks like the TOP 1 in the IN statement does make a difference!

    Check out the execution plan:

    SELECT o.SomeInt

    FROM #MyInTable AS o

    WHERE o.SomeInt in

    (

    SELECT...

  • RE: Semi joins

    It's interesting looking at the execution plans for the two queries:

    SELECT o.SomeInt

    FROM #MyInTable AS o

    WHERE o.SomeInt in

    (

    SELECT top 1 p.SomeInt FROM JBMTest AS p

    WHERE p.SomeInt = o.SomeInt

    )

    |--Nested Loops(Left...

  • RE: Semi joins

    RBarryYoung (12/30/2008)


    One thing that I noticed is that you have reversed the roles of the tables in Jeff's example. Originally, Jeff had #MyInTable as the subordinate table, but you...

  • RE: Semi joins

    Fixed... sorry about that.

    I'll post some observations tomorrow.

  • RE: Semi joins

    Ummmm... apologies, it seems I've accidently widened the page 🙁

    Anyone know how to fix the post?

  • RE: Semi joins

    Well here is something interesting. Unfortunately, I'm still learning about the underlying database engine (I'm only half way through Karen Delaney's excellent Query Tuning and Optimization book for SQL Server...

  • RE: Semi joins

    Hmmmm... I think I'm going to definitely test this one out myself!

    When I do I'll post my results.

  • RE: Preferred singer for expert DBA

    Steve Jones - Editor (12/25/2008)


    At least this wasn't my question!

    I did think it was cute.

    lol, it was 🙂 Definitely brought a smile to my face. And I got 8 points...

  • RE: Preferred singer for expert DBA

    Oh man... I thought that a PUN was the lowest form of humour. Guess I was wrong 😀

  • RE: DB Recovery

    Good point. I concede the point!

    Question was badly asked.

Viewing 15 posts - 181 through 195 (of 207 total)