Forum Replies Created

Viewing 15 posts - 8,176 through 8,190 (of 8,416 total)

  • RE: Comparison of Dates in SQL

    Tao Klerks (4/28/2009)


    Are you saying that the following statement would result in a better query plan? (or more reliably result in a good query plan?)

    SELECT *

    FROM SomeTable

    WHERE (SomeColumn >= '2009-04-01'...

  • RE: Comparison of Dates in SQL

    craig.lovegren (4/28/2009)


    I did exactly that, using the small example, you find that the datediff and dateadd are nearly identical, indexes or not. So I grabbed a large table (a...

  • RE: Comparison of Dates in SQL

    Tao Klerks (4/28/2009)


    Interesting approach - we use Convert, relying on the fact that DateTime values are internally stored as floating-point values, with every whole number representing a day

    The FLOAT method...

  • RE: Comparison of Dates in SQL

    benr (4/28/2009)


    When I am working with dates, I always say >= the begin date, and then < the next day. Eg. If you want all records up to and including...

  • RE: Comparison of Dates in SQL

    Tao Klerks (4/28/2009)


    The following statement is untrue: "it is always a good practice to use DATEDIFF method for date comparison instead of making comparison using logical operators (,=)".

    Agreed.

    Tao Klerks (4/28/2009)


    As...

  • RE: Comparison of Dates in SQL

    henrik staun poulsen (4/28/2009)


    Is SQL Server able to use indexes when using DateDiff(Day, D1, D2) = 0 ?

    Best regards

    Henrik Staun Poulsen

    FTFY 🙂

    The answer is yes.

    But only if:

    • There is an index...

  • RE: Virtualise production OLAP Server

    I can't resist it.

    You lose physical/hardware redundancy because water leaking onto a box running four VMs downs four servers.

    In Active/Active you can run at close to full tilt so long...

  • RE: Virtualise production OLAP Server

    andrew.hatfield (4/27/2009)


    Sometimes you just can't win 🙂

    True. It has been a fun discussion. We clearly disagree and I guess that's ok.

    andrew.hatfield (4/27/2009)


    This is a hard discussion to have,...

  • RE: Virtualise production OLAP Server

    andrew.hatfield (4/27/2009)


    Generally, you virtualise a number of systems in a cluster / farm. So you would benefit from a number of systems reducing from one physical server each to...

  • RE: Virtualise production OLAP Server

    andrew.hatfield (4/27/2009)


    By definition those success stories are based on experience.

    ...or marketing deals :laugh:

    andrew.hatfield (4/27/2009)


    Looking at your example and highlighting that it is is very light on details, I wouldn't consolidate...

  • RE: Performance issue with tally solution

    Hey good answers Flo.

    Never be afraid of posting theoretical or odd examples of stuff without a production requirement!

    And yes there is always someone that knows more about a given subject...which...

  • RE: Performance issue with tally solution

    @Phil - Jeff convinced me that posting compiled code was a no-no. Even if tools like .NET reflector are available. Maybe Adam will post a script for you*...

  • RE: Performance issue with tally solution

    Adam Machanic (4/27/2009)


    NVARCHAR(MAX) for both input and output? What is the use case? Just to be clear, the issue is only NVARCHAR(MAX) on output -- it's fine to...

  • RE: Performance issue with tally solution

    Thank you to whomever fixed the formatting on this page!

    I had to scroll right about 50 metres to find the reply button earlier... 🙂

    @Flo: Yes scripting is easy, but if...

  • RE: Performance issue with tally solution

    Phil Factor (4/27/2009)


    Am I right in thinking that it is expecting a single-character delimiter? If so, it is not strictly comparable, as Flo's original problem involved a two-character delimiter. Persumably,...

  • Viewing 15 posts - 8,176 through 8,190 (of 8,416 total)