Professional Web Applications Themes

Very Slow when date range includes future date - Microsoft SQL / MS SQL Server

Does the following article apply to your situation? http://support.microsoft.com/default.aspx?scid=kb;en-us;319173 "Mike" <com> wrote in message news:phx.gbl...  Result1,  IS  second. ...

  1. #1

    Default Re: Very Slow when date range includes future date

    Does the following article apply to your situation?

    http://support.microsoft.com/default.aspx?scid=kb;en-us;319173


    "Mike" <com> wrote in message
    news:phx.gbl... 
    Result1, 
    IS 
    second. 


    Jacco Guest

  2. #2

    Default Re: Very Slow when date range includes future date

    I have the latest service pack on our SQL Server box. But I'm not sure that
    applies because the select statement works great when I don't use a future
    date in the select statement.

    Any other ideas? Im stumped.

    Thanks,

    Mike



    "Jacco Schalkwijk" <co.uk> wrote in message
    news:ezU49E%phx.gbl... [/ref]
    (x.DateTime 
    > Result1, [/ref]
    (y.DateTime [/ref]
    (Col1 [/ref]
    still 
    > second. 
    >
    >[/ref]


    Mike Guest

  3. #3

    Default Re: Very Slow when date range includes future date

    Mike,

    Is this an equivalent query? (I'm assuming ColID is never NULL)


    select
    Col1, count(Col2_One) Result1, count(*) Result2
    from (
    select
    Col1,
    case when Col2 = '1' then 1 else null end Col2_One
    from tblTable
    where [DateTime] > '20030721'
    and [DateTime] < '20030722'
    ) T

    If so, maybe it will be faster.

    -- Steve Kass
    -- Drew University
    -- Ref: A297E755-0208-48B7-B6C0-491F435B4145

    Mike wrote:
     

    Steve Guest

Similar Threads

  1. Date Range
    By JMcDaniels in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: April 7th, 07:00 PM
  2. Date Range - Calendar?
    By Goodwin in forum Macromedia Director Lingo
    Replies: 5
    Last Post: January 26th, 12:22 PM
  3. Sort By Date Range, How Do I ?
    By John in forum Microsoft Access
    Replies: 4
    Last Post: August 18th, 02:29 AM
  4. Search Birthday Date in 30 days future without year
    By Howard Schlossberg in forum FileMaker
    Replies: 3
    Last Post: August 15th, 03:41 PM
  5. date range query
    By shau in forum Microsoft SQL / MS SQL Server
    Replies: 1
    Last Post: July 11th, 10:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139