1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

求助:页面查询太多 windows2003下 应用程序池超负荷。求助高手优化一下。说一下方法。

本帖由 oldcpu2006-06-24 发布。版面名称:主机讨论

  1. oldcpu

    oldcpu New Member

    注册:
    2006-03-13
    帖子:
    17
    赞:
    0
    :lovely: 只贴了首页 请高手赐教。应该怎么来优化。
    只贴了首页

    <!--#include file="conn.asp"--> 数据库连接
    <!--#include file="ip.asp"--> 封IP

    <%
    set rs=server.createobject("adodb.recordset")
    sql="select * from const"
    rs.open sql,conn,1,1

    b=rs("StartDate")
    copyright=rs("Copyright")
    ver=rs("ver")
    email=rs("AdminEmail")
    url=rs("weburl")
    all=cint(rs("MaxMusicList"))
    rs.close
    %>

    <html>
    <head>
    <title>MMF手机铃声下载</title>
    <meta http-equiv=Content-Type content="text/html; charset=gb2312">
    <meta name="keywords" content="MMF手机铃声下载,mp3手机铃声,,ring,rings,MMF手机铃声下载">
    <meta name="description" content="MMF手机铃声下载 is a web content manage system" >
    <meta name="rating" content="general" >
    <meta name="author" content="bybyby,MMFring" >
    <meta name="copyright" content="Copyright 2006 MMF手机铃声下载" >
    <meta name="generator" content="mp3手机铃声,MMF手机铃声下载" >

    <style type=text/css>
    body{font-family:宋体}
    td{font-size:12px}
    .f14{font-size:14.8px}
    .ff{font-family:Verdana;font-size:16px}
    .s{text-decoration:none}
    .t{color:#0000cc;text-decoration:none}
    a.t:hover{
    text-decoration:underline;
    font-size: 12pt;
    font-weight: bold;
    }
    .m{color:#000000;cursor:hand;text-decoration:none}
    a.m:hover{text-decoration:underline}.style1 {
    font-weight: bold;
    font-size: 9pt;
    }
    .STYLE21 {
    font-size: 10pt;
    color: #0000FF;
    font-weight: bold;
    }
    .STYLE24 {color: #FF0000; font-size: 12pt; }
    .STYLE25 {font-size: 10px}
    .STYLE26 {font-size: 10}
    .STYLE27 {font-size: 10pt}
    .STYLE28 {color: #FF0000}
    .STYLE31 {
    color: #000000;
    font-size: 10pt;
    }
    .STYLE32 {color: #009AFF}
    .STYLE33 {color: #00CF63}
    .STYLE34 {color: #0099FF}
    .STYLE49 {font-size: 10pt; color: #009933; }
    .STYLE50 {color: #009966}
    </style>
    <script language="javascript">
    function chkfields() {
    if(SEARCH.type.value==""){
    alert("请输入搜索的关键字!");
    SEARCH.type.focus();
    return false;
    }
    }
    </script>
    </head>
    <body bgcolor=FFFFFF text=000000 link=0000CC vlink=0000CC alink=FF6600>
    <div align=center>
    <br>
    </a></span><span class="STYLE31"><a title="MMF手机铃声下载" href="http://MMFring.com"><img src="logo.gif" width="295" height="92" border="0"></a></span><br>

    <MARQUEE>
    <span class="STYLE21"><span class="STYLE24">好消息:</span>本站铃声全面无线化,<span class="STYLE24">现在用手机登陆:wap.MMFring.com</span> 就可以与本站同步免费下载本站所有MMF铃声~</span><br>
    </MARQUEE>
    </p>
    </font></b></div>

    <div align="center">
    <table width=600 border=0 cellspacing=0 cellpadding=0 height="30">
    <tr class=f9>
    <td valign=top width="82" align="center" >&nbsp;</td>
    <td valign=top width="435" align="center" >
    <form name="SEARCH" action="searchs.asp" method="POST">
    <p>
    <input name=type type=text class=ff size=33>
    <input name="submit" type=submit value="搜索">
    <span lang="zh-cn"><span lang="zh-cn"><b><span class="STYLE25"><span class="STYLE26"><span class="STYLE27"><a href="top.asp"><br>
    <br>
    <br>
    排行<font color="#FF0000">Top</font>100</a>&nbsp;&nbsp;</span></span></span><font color="#0000CE"><a href="weektop.asp" class="STYLE27">本周<font color="#FF0000" size="2"><span lang="zh-cn" xml:lang="zh-cn">T</span>op</font>50</a></font><span class="STYLE25"><span class="STYLE26"><span class="STYLE27">&nbsp; </span></span></span></b></span><span class="STYLE27"><b><a href="tuijian.asp">铃声<font color="#FF0000">推荐</font><font color="#0000FF">5</font>0</a>&nbsp;&nbsp;新铃<font color="#FF0000">30</font>强</b></span></span><br>
    <br>
    <span lang="zh-cn">
    <%
    sql="select * from Special order by SpecialID "
    rs.open sql,conn,1,1
    if rs.eof then
    response.write("还没分类")
    else
    do while not rs.eof
    response.write("<a href=list.asp?Special="&rs("SpecialID")&">"&rs("Name")&"</a>&nbsp;")
    rs.movenext
    loop
    end if
    rs.close
    %>
    <a href="singer.asp" class="STYLE28 STYLE27"><strong>全部铃声</strong></a></span><br>
    </form>
    </td>
    <td width=83 valign=top> <p align="center" class="STYLE31"><span class="STYLE33" style="letter-spacing: 1px; font-weight: 700" lang="zh-cn">
    <a target="_blank" title="本留言论坛需要与MMF铃声下载站分开重新注册" href="/bbs"> MMFring<br>
    <span class="STYLE28">会员交流</span></a></span><br>
    <br>
    <b><a href="usertop.asp" class="STYLE32">会员排行<br>
    </a><br>
    <a href="help.asp" target="_blank" class="STYLE33"><span class="STYLE34">会员帮助</span><br>
    </a></b></p></td></tr>
    <tr class=f9 align=center valign="top">
    <td colspan=4 height=28 align=center><%if session("HappyMusicUser")<>"" then%>
    <!--#include file="index_logins.asp"-->
    <%else%><!--#include file="index_login.asp"-->
    <%end if%> </td>
    </tr>
    <tr>
    <td>
    <tr class=f9 valign="top">
    <td colspan="4" height="33" align=center>
    <table cellpadding="0" cellspacing="0" width="99%" id="table1" height="26">
    <!-- MSTableType="nolayout" -->
    <tr>
    <td height="26" align="right">&nbsp;总有会员:
    <%shu=0
    sql="select count(id) from [user]"
    rs=conn.execute(sql)
    shu=rs(0)

    %>
    <%=shu%> </td>
    <td height="26" align="center">最新加入会员数
    <%
    shu=0
    sql="select count(id) from [user] where addDate=date()"
    rs2=conn.execute(sql)
    shu=rs2(0)

    %><%=shu%> </td>
    <td height="26">建站时间:
    <%

    a=date()

    c=DateDiff("d",b,a) %>

    <%=c%>天 </td>
    <td height="26">剩余上传空间:
    <%
    sql="select sum(daxiao) from musiclist where DateAndTime = date() and dengji = 1 "
    rs=conn.execute(sql)
    AllSoftSize=rs(0)
    if isnull(AllSoftSize) then AllSoftSize=0
    yong=all-AllSoftSize
    %>
    <%=yong%>KB </td>
    </tr>
    </table>
    <table width=600 border=0 cellspacing=0 cellpadding=0 align="center">
    <tr>
    <td colspan="2" height="33" align=center>
    &nbsp;
    <iframe width="468" height="60" src="http://code1.caiku.com/468x60_9.htm?uid=12693&style=1" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><tr>
    <%
    i=0
    set rs=server.createobject("adodb.recordset")
    sql="select * from logo where logoimg = '0' "
    rs.open sql,conn,1,1
    if not rs.eof then

    do while not rs.eof
    i=i+1
    %>
    <%if (i mod 5 <> 0) Then %>
    <td width=20% height=25><a href=<%=rs("logourl")%> target=_blank><%=rs("logoname")%></a></td>
    <%else%>
    <td width=20% height=25><a href=<%=rs("logourl")%> target=_blank><%=rs("logoname")%></a></td></tr>
    <%end if%>
    <%rs.movenext
    loop
    else
    end if
    rs.close
    %>
    </tr>
    </table>
    <br>
    <table width=600 border=0 cellspacing=0 cellpadding=0 align="center">
    <tr>
    <% l=0
    set rs=server.createobject("adodb.recordset")
    sql="select * from logo where logoimg <> '0' "
    rs.open sql,conn,1,1
    if not rs.eof then

    do while not rs.eof
    l=l+1
    %>
    <%if (l mod 5 <> 0) Then %>
    <td width=20% height=38>
    <a href=<%=rs("logourl")%> target=_blank title="<%=rs("logoname")%>"><img src="<%=rs("logoimg")%>" border=0 width=88 height=31></a></td>
    <%else%>
    <td width=20% height=38>
    <a href=<%=rs("logourl")%> target=_blank title="<%=rs("logoname")%>"><img src="<%=rs("logoimg")%>" width=88 height=31 border=0></a></td></tr>
    <%end if%>
    <%rs.movenext
    loop
    else

    end if
    rs.close
    %>
    </tr>
    </table> </td>
    <tr>
    <td>
    </tr>
    <tr class=f9>
    <td height="22" colspan="4" align="center">
    <b>
    <font size="2"><a target="_blank" href="../jianjie.htm"><br>
    </a></font></b><span class="style1"><a target="_blank" href="../jianjie.htm">关于我们</a> |
    <a href="mailto:[email protected]">事务联系</a> |
    <a href="/links" target="_blank">友情连接</a> | <a href="javascript:{window.external.addFavorite('http://mmfring.com','『MMF手机铃声下载』')}"><font color="#008080">加入收藏夹</font></a> |
    </span>
    <span class="style1"><a href="http://mp3ls.com/" onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://mp3ls.com/');" style="BEHAVIOR: url(#default#homepage)" target="_blank">
    设为首页</a></span> </td>
    </tr>
    </table>
    </div>
    <div align="center">
    <table cellpadding="0" cellspacing="0" width="600" height="50">
    <!-- MSTableType="layout" -->
    <tr>
    <td valign="top" height="20">
    <p align="center">
    <a href="index.asp">
    <span style="text-decoration: none"><font color="#000000">MMF手机铃声下载</font></span></a><font face="Verdana," sans-serif Helvetica, Arial,>Copyright &copy;2005-2006<font style="FONT-SIZE: 12pt; COLOR: #660066; LINE-HEIGHT: 14pt; FONT-FAMILY: Impact">
    MMFring</font><font style="FONT-SIZE: 12pt; COLOR: #993399; LINE-HEIGHT: 14pt; FONT-FAMILY: Impact">.com</font>,
    All Rights Reserved </font></td>
    </tr>
    <tr>
    <td valign="middle" height="30" width="600">
    <p align="center">
    <span style="text-decoration: none">
    <a href="http://mp3ls.com">
    <span style="text-decoration: none"><font color="#0000FF">
    MMF铃声</font></span></a><font color="#0000FF"> 手机MMF铃声</font></span> 版本信息:MMFring Ver<span lang="en-gb">2</span>.3 MMF铃声下载<br>
    <b></font></b></td>
    </tr>
    </body>
    <script language="">
    function scrollit_r2l(seed)
    { var m1 = "MMF手机铃声下载 mp3ls.com 欢迎您~如果您觉得不站还不错,请告诉您的朋友,谢谢!手机访问本站:wap.MMFring.com" ;
    var m2 = "" ;
    var msg=m1+m2;
    var out = " ";
    var c = 1;
    var speed = 220;
    if (seed > 100)
    { seed-=2;
    var cmd="scrollit_r2l(" + seed + ")";
    timerTwo=window.setTimeout(cmd,speed);}
    else if (seed <= 100 && seed > 0)
    { for (c=0 ; c < seed ; c++)
    { out+=" ";}
    out+=msg; seed-=2;
    var cmd="scrollit_r2l(" + seed + ")";
    window.status=out;
    timerTwo=window.setTimeout(cmd,speed); }
    else if (seed <= 0)
    { if (-seed < msg.length)
    {
    out+=msg.substring(-seed,msg.length);
    seed-=2;
    var cmd="scrollit_r2l(" + seed + ")";
    window.status=out;
    timerTwo=window.setTimeout(cmd,speed);}
    else { window.status=" ";
    timerTwo=window.setTimeout("scrollit_r2l(100)",speed);
    }
    }
    }
    scrollit_r2l(100);
    </script></html>
     
  2. 小叶

    小叶 New Member

    注册:
    2005-09-04
    帖子:
    17,941
    赞:
    33
    将那些不必要的JS去掉,
    如果分类已经是固定,不是经常修改,做成静态,

    下面的会员统计,最新加入会员,建站时间,也不是经常更新的,生成JS嵌入进来。
    可以后台控制。

    还有尽量看能不能少用
    sql="select * from logo where logoimg <> '0' "
    这样的,用select 字段1,字段2 from logo 。。。
     
  3. oldcpu

    oldcpu New Member

    注册:
    2006-03-13
    帖子:
    17
    赞:
    0
    不知道那位有时间 付点费用 帮忙修改一下?:confused: