|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQL query performance
<i><b>Originally posted by : Hang (f11lhc@yhaoo.com.hk)</b></i><br />Hi all,<br /><br />I'm now trying to monitor the performance of my asp page. But I have a doubt when facing the SQL query.<br /><br />For the following code segment:<br /><br />set conn = server.CreateObject("ADODB.Connection")<br />db = conn.open("DSN=abc;uid=sa;password=sa")<br /><br />Set rs = db.execute("select * from a_table")<br /><br />response.write rs("item")<br /><br />Which statement should I monitor on? the execute statement or the fetch statement.<br /><br /><br />Thanks<br /><br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Koen Van Tolhuyzen (Koen.VanTolhuyzen@cronos)</b></i><br />You should monitor 2 statements :<br />1. One you open the connection (BTW, you should use OLEDB in stead of ODBC)<br />2. The execute of the sql-statement (BTW : Stored procedures are normally faster -> since they are compiled<br /><br />Greetings<br /><br />Koen<br /><br />------------<br />Hang at 2/26/2001 1:07:46 AM<br /><br />Hi all,<br /><br />I'm now trying to monitor the performance of my asp page. But I have a doubt when facing the SQL query.<br /><br />For the following code segment:<br /><br />set conn = server.CreateObject("ADODB.Connection")<br />db = conn.open("DSN=abc;uid=sa;password=sa")<br /><br />Set rs = db.execute("select * from a_table")<br /><br />response.write rs("item")<br /><br />Which statement should I monitor on? the execute statement or the fetch statement.<br /><br /><br />Thanks<br /><br />
|
|
#3
|
|||
|
|||
|
<i><b>Originally posted by : Hang (f11lhc@yahoo.com.hk)</b></i><br />Thanks for your help.<br />But I'm still in doubt.<br /><br />The execute statement, in my case,<br />Set rs = db.execute("select * from a_table")<br />Is it will only get cursor but no contents back?<br /><br />If it only fetch cursor back with no content, when does it really fetch the content of the db?<br /><br /><br /><br />------------<br />Koen Van Tolhuyzen at 2/27/2001 1:08:27 AM<br /><br />You should monitor 2 statements :<br />1. One you open the connection (BTW, you should use OLEDB in stead of ODBC)<br />2. The execute of the sql-statement (BTW : Stored procedures are normally faster -> since they are compiled<br /><br />Greetings<br /><br />Koen<br /><br />------------<br />Hang at 2/26/2001 1:07:46 AM<br /><br />Hi all,<br /><br />I'm now trying to monitor the performance of my asp page. But I have a doubt when facing the SQL query.<br /><br />For the following code segment:<br /><br />set conn = server.CreateObject("ADODB.Connection")<br />db = conn.open("DSN=abc;uid=sa;password=sa")<br /><br />Set rs = db.execute("select * from a_table")<br /><br />response.write rs("item")<br /><br />Which statement should I monitor on? the execute statement or the fetch statement.<br /><br /><br />Thanks<br /><br />
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > SQL query performance |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|