Query Processing Time

J

John Peter

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
 
B

Bob Barrows

John said:
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
 
J

John Peter

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.
 
J

John Peter

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
 
B

Bob Barrows

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

Bob Barrows
 
B

Bob Barrows

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
 
D

dlbjr

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top