Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_ado_rds thread: which one's performance is better?? someting about recordsset


Message #1 by "tinweimin" <steven_tin@e...> on Thu, 3 May 2001 03:05:07
please execute my english.



If in the html(Asp) , i need to open 3 or more table ......

Usually i will design the code like this:

  set rs.open  sql1,conn,3,3

  set rs2.open sql2,conn,3,3

  ........



the other method is like this:

it design the code by multiple recordset....

<%

 set rs = server.createobject("adodb.recordset")

 sql = " select a from tableA ...;"

 sql = sql & "select b from tabeleB ...;"

 rs.open sql,conn,3,3

%>





which one is better(more performance) ??? and why???



thanks lot.

                                                   steven.

Message #2 by "Branimir Giurov" <branimir@n...> on Fri, 11 May 2001 15:44:49
in general , it's better to use the second way.

then, on the second rs.Open, you'll get the the second sql statement 

executed.



try to use as little memory as possible when it's possible.

every new object initialization, eats a lot of system resources.





> please execute my english.

> 

> If in the html(Asp) , i need to open 3 or more table ......

> Usually i will design the code like this:

>   set rs.open  sql1,conn,3,3

>   set rs2.open sql2,conn,3,3

>   ........

> 

> the other method is like this:

> it design the code by multiple recordset....

> <%

>  set rs = server.createobject("adodb.recordset")

>  sql = " select a from tableA ...;"

>  sql = sql & "select b from tabeleB ...;"

>  rs.open sql,conn,3,3

> %>

> 

> 

> which one is better(more performance) ??? and why???

> 

> thanks lot.

>                                                    steven.


  Return to Index