Forum Replies Created

Viewing 15 posts - 4,741 through 4,755 (of 5,843 total)

  • RE: Performance issue with tally solution

    Flo, are you getting your reads from SET STATISTICS IO ON? IIRC UDFs don't report IO correctly in this manner. Try getting them with Profiler.

  • RE: Comparison of Dates in SQL

    Ashish Pathak (5/1/2009)


    I have gone through the entore thread. Could you please tell me how my solution is so suboptimal. Will it not work in any condition or will it...

  • RE: Comparison of Dates in SQL

    Paul White (4/30/2009)


    TheSQLGuru (4/30/2009)


    ...there is also the same issue of index scan/seek if you are using a function on a column in a where clause.

    Unless you use the solution posted...

  • RE: Comparison of Dates in SQL

    Goldie Graber (4/30/2009)


    Amber.Brouillard (4/30/2009)


    Hi Jeff,

    The dates I use do have a time with them (that is how SQL stores them) and dateadd(day, 1, date) still works fine.

    Thanks!

    Amber

    If your dates have...

  • RE: Comparison of Dates in SQL

    Ashish Pathak (4/30/2009)


    Posted comment on Comparision of Dates in SQL looks fine. But as written above, it may not be the best solution in case of using indexes. Well... while...

  • RE: Insert of huge records per minute

    Alejandro Pelc (4/29/2009)


    I agree with TheSQLGuru about the lack of information to correctly guide ritesh, but also think that tempdb comments are important because of the same reason: didn't provide...

  • RE: Insert of huge records per minute

    You didn't give us nearly enough information to guide you here. If you want the highest inserts per second, simply have a heap table with NO indexes whatsoever. ...

  • RE: Comparison of Dates in SQL

    itamar (4/29/2009)


    How about different kind of SQL compare tools, they work OK with dates?

    when using comparison tools one is most often comparing the entire table anyway, so index scan/seek issues...

  • RE: Comparison of Dates in SQL

    rob.lobbe (4/28/2009)


    TheSQLGuru (4/28/2009)


    Again this code will break with new, more precise, datetime datatypes in SQL Server 2008.

    Well if you change the code - ie the data type - of course...

  • RE: Comparison of Dates in SQL

    craig.lovegren (4/28/2009)


    rob.lobbe (4/28/2009)


    Not sure why dates cause so much trouble...

    declare

    @date datetime,

    @today datetime,

    @tonight datetime

    select

    @date = getdate(),

    @today = convert(datetime,convert(int,@date)),--use smallint for smalldatetime

    ...

  • RE: Comparison of Dates in SQL

    Josie (4/28/2009)


    the easiest way to extract date ranges without having to worry about the time parts is to subtract 1 day from the bottom of the range and add 1...

  • RE: Comparison of Dates in SQL

    Kurt W. Zimmerman (4/28/2009)


    My approach is quite simple. Often times I am passing in a date range into a sproc for selection criteria. What I do is the...

  • RE: Comparison of Dates in SQL

    Dallas Martin (4/28/2009)


    Hmm... You may suffer a huge performance hit if you use DATEDIFF().

    SQL SVR may have to perform a full table scan. Not exactly what one

    desires in a...

  • RE: Performance issue with tally solution

    A very minor point for Number/Tally tables is to create the clustered index after population and to specify 100% fill factor. This will ensure minimal IO for subsequent use....

  • RE: Performance issue with tally solution

    What an absolutely amazing thread this is! Well done to all involved. I have learned a good bit, and have some new tools in my bag of tricks!...

Viewing 15 posts - 4,741 through 4,755 (of 5,843 total)