Query Processing Time

Discussion in 'ASP General' started by John Peter, Aug 29, 2003.

  1. John Peter

    John Peter Guest

    How can i set the Query Processing Time in my asp page.
    i am getting this error messages "Estimated query processing time 152
    exceeds limit 30"

    John
    John Peter, Aug 29, 2003
    #1
    1. Advertising

  2. John Peter

    Bob Barrows Guest

    John Peter wrote:
    > How can i set the Query Processing Time in my asp page.
    > i am getting this error messages "Estimated query processing time 152
    > exceeds limit 30"
    >
    > John

    You can try increasing the CommandTimeout property of your Connection or
    Command object, but I would not stop there. You should talk to your AS400
    operator about building indexes on the tables involved in your query so a
    better query plan will be used. This is what helped when I encountered this
    error a few weeks ago.

    HTH,
    Bob Barrows
    Bob Barrows, Aug 29, 2003
    #2
    1. Advertising

  3. John Peter

    John Peter Guest

    Bob,
    i tried changing value for CommandTimeout property but still error same
    message.
    The field on which i have my WHERE condition is not indexed and table has
    about 700000 records and i can't index the table now.
    can you suggest some thing else.


    "Bob Barrows" <> wrote in message
    news:%...
    > John Peter wrote:
    > > How can i set the Query Processing Time in my asp page.
    > > i am getting this error messages "Estimated query processing time 152
    > > exceeds limit 30"
    > >
    > > John

    > You can try increasing the CommandTimeout property of your Connection or
    > Command object, but I would not stop there. You should talk to your AS400
    > operator about building indexes on the tables involved in your query so a
    > better query plan will be used. This is what helped when I encountered

    this
    > error a few weeks ago.
    >
    > HTH,
    > Bob Barrows
    >
    >
    John Peter, Aug 29, 2003
    #3
  4. John Peter

    John Peter Guest

    Code:-

    Set DataConnFRP = Server.CreateObject("ADODB.Connection")
    DataConnFRP.ConnectionTimeout = 20000
    DataConnFRP.Open "DSN=my400;Uid=abc;Pwd=abc;"

    Set ObjRSetFRP = Server.CreateObject("ADODB.Recordset")
    ObjRSetFRP.CursorLocation = 3
    ObjRSetFRP.Open "Select * from FRP where Acct = 1549" , DataConnFRP

    Response.Write ObjRSetFRP.RecordCount

    ObjRSetFRP.Close
    Set ObjRSetFRP = Nothing
    DataConnFRP.Close
    Set DataConnFRP = Nothing


    "Bob Barrows" <> wrote in message
    news:...
    > What did you change it to? Where did you change it?
    > Let's see some code.
    >
    > John Peter wrote:
    > > Bob,
    > > i tried changing value for CommandTimeout property but still error
    > > same message.
    > > The field on which i have my WHERE condition is not indexed and table
    > > has about 700000 records and i can't index the table now.
    > > can you suggest some thing else.
    > >
    > >
    > > "Bob Barrows" <> wrote in message
    > > news:%...
    > >> John Peter wrote:
    > >>> How can i set the Query Processing Time in my asp page.
    > >>> i am getting this error messages "Estimated query processing time
    > >>> 152 exceeds limit 30"
    > >>>
    > >>> John
    > >> You can try increasing the CommandTimeout property of your
    > >> Connection or Command object, but I would not stop there. You should
    > >> talk to your AS400 operator about building indexes on the tables
    > >> involved in your query so a better query plan will be used. This is
    > >> what helped when I encountered this error a few weeks ago.
    > >>
    > >> HTH,
    > >> Bob Barrows

    >
    >
    John Peter, Aug 29, 2003
    #4
  5. John Peter

    Bob Barrows Guest

    I see where you set the ConnectionTimeout, which is totally irrelevant to
    this problem. Where did you set the CommandTimeout?

    Bob Barrows

    John Peter wrote:
    > Code:-
    >
    > Set DataConnFRP = Server.CreateObject("ADODB.Connection")
    > DataConnFRP.ConnectionTimeout = 20000
    > DataConnFRP.Open "DSN=my400;Uid=abc;Pwd=abc;"
    >
    > Set ObjRSetFRP = Server.CreateObject("ADODB.Recordset")
    > ObjRSetFRP.CursorLocation = 3
    > ObjRSetFRP.Open "Select * from FRP where Acct = 1549" , DataConnFRP
    >
    > Response.Write ObjRSetFRP.RecordCount
    >
    > ObjRSetFRP.Close
    > Set ObjRSetFRP = Nothing
    > DataConnFRP.Close
    > Set DataConnFRP = Nothing
    >
    >
    > "Bob Barrows" <> wrote in message
    > news:...
    >> What did you change it to? Where did you change it?
    >> Let's see some code.
    >>
    >> John Peter wrote:
    >>> Bob,
    >>> i tried changing value for CommandTimeout property but still error
    >>> same message.
    >>> The field on which i have my WHERE condition is not indexed and
    >>> table has about 700000 records and i can't index the table now.
    >>> can you suggest some thing else.
    >>>
    >>>
    >>> "Bob Barrows" <> wrote in message
    >>> news:%...
    >>>> John Peter wrote:
    >>>>> How can i set the Query Processing Time in my asp page.
    >>>>> i am getting this error messages "Estimated query processing time
    >>>>> 152 exceeds limit 30"
    >>>>>
    >>>>> John
    >>>> You can try increasing the CommandTimeout property of your
    >>>> Connection or Command object, but I would not stop there. You
    >>>> should talk to your AS400 operator about building indexes on the
    >>>> tables involved in your query so a better query plan will be used.
    >>>> This is what helped when I encountered this error a few weeks ago.
    >>>>
    >>>> HTH,
    >>>> Bob Barrows
    Bob Barrows, Aug 29, 2003
    #5
  6. John Peter

    John Peter Guest

    So where should i set the CommandTimeout and ConnectionTimeout?

    John

    "Bob Barrows" <> wrote in message
    news:Owa1%...
    > I see where you set the ConnectionTimeout, which is totally irrelevant to
    > this problem. Where did you set the CommandTimeout?
    >
    > Bob Barrows
    >
    > John Peter wrote:
    > > Code:-
    > >
    > > Set DataConnFRP = Server.CreateObject("ADODB.Connection")
    > > DataConnFRP.ConnectionTimeout = 20000
    > > DataConnFRP.Open "DSN=my400;Uid=abc;Pwd=abc;"
    > >
    > > Set ObjRSetFRP = Server.CreateObject("ADODB.Recordset")
    > > ObjRSetFRP.CursorLocation = 3
    > > ObjRSetFRP.Open "Select * from FRP where Acct = 1549" , DataConnFRP
    > >
    > > Response.Write ObjRSetFRP.RecordCount
    > >
    > > ObjRSetFRP.Close
    > > Set ObjRSetFRP = Nothing
    > > DataConnFRP.Close
    > > Set DataConnFRP = Nothing
    > >
    > >
    > > "Bob Barrows" <> wrote in message
    > > news:...
    > >> What did you change it to? Where did you change it?
    > >> Let's see some code.
    > >>
    > >> John Peter wrote:
    > >>> Bob,
    > >>> i tried changing value for CommandTimeout property but still error
    > >>> same message.
    > >>> The field on which i have my WHERE condition is not indexed and
    > >>> table has about 700000 records and i can't index the table now.
    > >>> can you suggest some thing else.
    > >>>
    > >>>
    > >>> "Bob Barrows" <> wrote in message
    > >>> news:%...
    > >>>> John Peter wrote:
    > >>>>> How can i set the Query Processing Time in my asp page.
    > >>>>> i am getting this error messages "Estimated query processing time
    > >>>>> 152 exceeds limit 30"
    > >>>>>
    > >>>>> John
    > >>>> You can try increasing the CommandTimeout property of your
    > >>>> Connection or Command object, but I would not stop there. You
    > >>>> should talk to your AS400 operator about building indexes on the
    > >>>> tables involved in your query so a better query plan will be used.
    > >>>> This is what helped when I encountered this error a few weeks ago.
    > >>>>
    > >>>> HTH,
    > >>>> Bob Barrows

    >
    >
    >
    John Peter, Aug 29, 2003
    #6
  7. John Peter

    Bob Barrows Guest

    You shouldn't need to set ConnectionTimeout. Set the CommandTimeout in the
    same place you set the ConnectionTimeout. In other words, replace
    "DataConnFRP.ConnectionTimeout = 20000" with "DataConnFRP.CommandTimeout =
    20000" (or "DataConnFRP.CommandTimeout = 0" which tells it to never time
    out). Again, the better thing to do is fix your query so it doesn't take so
    long to execute.

    HTH,
    Bob Barrows

    John Peter wrote:
    > So where should i set the CommandTimeout and ConnectionTimeout?
    >
    > John
    >
    > "Bob Barrows" <> wrote in message
    > news:Owa1%...
    >> I see where you set the ConnectionTimeout, which is totally
    >> irrelevant to this problem. Where did you set the CommandTimeout?
    >>
    >> Bob Barrows
    >>
    >> John Peter wrote:
    >>> Code:-
    >>>
    >>> Set DataConnFRP = Server.CreateObject("ADODB.Connection")
    >>> DataConnFRP.ConnectionTimeout = 20000
    >>> DataConnFRP.Open "DSN=my400;Uid=abc;Pwd=abc;"
    >>>
    >>> Set ObjRSetFRP = Server.CreateObject("ADODB.Recordset")
    >>> ObjRSetFRP.CursorLocation = 3
    >>> ObjRSetFRP.Open "Select * from FRP where Acct = 1549" , DataConnFRP
    >>>
    >>> Response.Write ObjRSetFRP.RecordCount
    >>>
    >>> ObjRSetFRP.Close
    >>> Set ObjRSetFRP = Nothing
    >>> DataConnFRP.Close
    >>> Set DataConnFRP = Nothing
    >>>
    >>>
    >>> "Bob Barrows" <> wrote in message
    >>> news:...
    >>>> What did you change it to? Where did you change it?
    >>>> Let's see some code.
    >>>>
    >>>> John Peter wrote:
    >>>>> Bob,
    >>>>> i tried changing value for CommandTimeout property but still error
    >>>>> same message.
    >>>>> The field on which i have my WHERE condition is not indexed and
    >>>>> table has about 700000 records and i can't index the table now.
    >>>>> can you suggest some thing else.
    >>>>>
    >>>>>
    >>>>> "Bob Barrows" <> wrote in message
    >>>>> news:%...
    >>>>>> John Peter wrote:
    >>>>>>> How can i set the Query Processing Time in my asp page.
    >>>>>>> i am getting this error messages "Estimated query processing
    >>>>>>> time 152 exceeds limit 30"
    >>>>>>>
    >>>>>>> John
    >>>>>> You can try increasing the CommandTimeout property of your
    >>>>>> Connection or Command object, but I would not stop there. You
    >>>>>> should talk to your AS400 operator about building indexes on the
    >>>>>> tables involved in your query so a better query plan will be
    >>>>>> used. This is what helped when I encountered this error a few
    >>>>>> weeks ago.
    >>>>>>
    >>>>>> HTH,
    >>>>>> Bob Barrows
    Bob Barrows, Aug 29, 2003
    #7
  8. John Peter

    dlbjr Guest

    Bob,

    I am just emphasizing with you.

    Again, the better thing to do is fix your query so it doesn't take so
    long to execute.

    dlbjr
    dlbjr, Aug 29, 2003
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hubert Hung-Hsien Chang
    Replies:
    2
    Views:
    472
    Michael Foord
    Sep 17, 2004
  2. Admin
    Replies:
    9
    Views:
    375
    Admin
    Jul 20, 2005
  3. flamesrock
    Replies:
    8
    Views:
    452
    Hendrik van Rooyen
    Nov 24, 2006
  4. Alpha Blue
    Replies:
    3
    Views:
    403
    Alpha Blue
    Jul 28, 2009
  5. Admin
    Replies:
    3
    Views:
    104
    Joe Smith
    Jul 21, 2005
Loading...

Share This Page