How to use share pooling by ADO and ASP 3.0

Hi

Sorry about my enghlish.

I have a website, and i bought domain + host from provider. I see that it run faster when there is 1 people in my website, but it too slow when there are about 2 to many people in my website.

I used ADO connect, and the structure of my web site is:

File index.asp

<!--#Include file="connection.asp"-->
<%      session.CodePage=65001

      createWorkSpace()
      
%>
<html>
          ' my process here
          ........
<%    
           sql = "SELECT top 2 * FROM News order by NewsDate Desc"
           rs.Open sql, objConn, 1, 3
           while not rs.EOF  %>
      ' my process here                                                            
<%      rs.MoveNext
           Wend
           rs.Close%>
          ......
         <% closeWorkSpace() %>
</HTML>

File connection.asp

<%
dim  strVirtualPath, strPhysicalPath, strConnection
dim objConn
dim rs
strVirtualPath = "./db/data.mdb"
strPhysicalPath = Server.MapPath(strVirtualPath)
      
function createWorkSpace()
      strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strPhysicalPath
      Set objConn = server.CreateObject("ADODB.Connection")
      objConn.ConnectionString = strconnection
      objConn.Open
      set rs = Server.CreateObject("ADODB.Recordset")
end function

function closeWorkSpace()
      on error resume next
            rs.Close
            set rs = nothing  
            objConn.close
            set objConn=nothing
      on error goto 0
end function


I hear some people tell about share pooling, but i don't know how to to this with my web site.
Try this website: http://www.temvn.net/index.asp

thanks
tiephnAsked:
Who is Participating?
 
moduloConnect With a Mentor Commented:
PAQed with no points refunded (of 50)

modulo
Community Support Moderator
0
 
sushantjiCommented:
To enable connection pooling, go to -

Control Panel > Administrative Tools > Data Sources (ODBC) > Connection Pooling Tab

Double Click on the driver name you are using. Select the 'Pool Connections to this driver' radio button.

-------------------

A web site's performance depends on many factors. The most likely cause for your website being slow is that you are using MS Access as your database. MS Access is a desktop database. It is not recommended for real web sites with multiple users. You may need to change to MySQL, Postgres, SQL Server etc.

Another thing I noticed was that you need to remove SELECT * from your sql queries. SELECT * is much more expensive as compared to SELECT col1, col2 FROM ....  even at the database level.

Using Session variables also affects performance heavily, so Session should be avoided as far as possible.

------------
sushantji
------------
0
 
tiephnAuthor Commented:
thanks for your answer

but i saw many web site using MS Access, but they run very fast with multiple users.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.