喜悦国际村 
» 游客:  注册 | 登录 | 搜索 | 统计 | 喜悦证交所 | 帮助

RSS 订阅当前论坛  

【村长请吃饭啊】 ---北京诚聘--- 【你还在犹豫吗?】

上一主题 下一主题
     
标题: [问题] 数据检索显示后,非常之慢,WHY?  
 
chuhongbin
注册会员
Rank: 2



UID 91627
精华 0
积分 56
帖子 30
金钱 56 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2007-4-19
来自 辽宁盘锦
状态 离线
数据检索显示后,非常之慢,WHY?

有一个main页,页面中有一个iframe,main菜单中的所有操作都在iframe中显示和执行,
现在有一个问题,就是在iframe中数据检索出来,显示出来,如果数据量大于200条时,就会非常慢,
如果加分页就不会慢,会很快,括弧客户不让用分页,
代码如下:
希望哪个GG帮我看看,是不是代码里写了什么东西,资源没有释放?还是怎么回事?
后台数据库是oracle9
<?
   include('../common/conn_oracle.php');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<link rel="stylesheet" href="../css/table.css" type="text/css" media="all" />

//判断radio选择的数据

function onload_data(){ //修改
   var c_arr=new Array();
   var s=document.getElementsByName("sele");
   var c_i=0;
   for(i=0;i< s.length;i++){
      if(s.checked == true){
         var c_id = s.value;
         c_arr[c_i]=new Array(c_id);
         c_i++;
      }
   }
   var c_length=c_i;
   window.location.href="d_bfdbyjd.php?c_length="+c_length+"&c_arr="+c_arr+"";
}
</script>
</head>
<body>
<form name="form1" method="post" onsubmit="return findInPage(this.string.value);">
   <div id="box"><!--最外层,背景-->
      <div style="height:6px;"></div>
      <div id="header"><!--表头区的背景-->
         <div id="header_bar"><!--表处理区按钮-->
            <img onclick="onload_data()" src="../images/bt_ok1.gif" alt="此为添加按钮" title="确定" border="0" onmouseover="this.className='style2' "  onmouseout="this.className='style1' "  />
            <a href="../welcome.php" target="my_iframe" onfocus="this.blur()">
               <img src="../images/bt_cancel.gif" alt="此为返回按钮" title="返回首页" border="0" onmouseover="this.className='style2' "  onmouseout="this.className='style1' "  />
            </a>
         </div><!--表处理区按钮-->
          明细列表
      </div><!--表头区的背景-->
      <div id="content"><!--表内容区-->
         <table id="table1" class="t1" style="width:706px;">
            <tr>
               <th style="width:30px;" nowrap>选择</th>
               <th style="width:80px;" nowrap>编码</th>
               <th nowrap>名称</th>
               <th nowrap>文号</th>
               <th style="width:80px;" nowrap>时间</th>
               <th style="width:30px;" nowrap>数量</th>
               <th style="width:70px;" nowrap>复合数量</th>
               <th nowrap>原值</th>
               <th nowrap>累计折旧</th>
               <th nowrap>账面价值</th>
               <th nowrap>减值准备</th>
               <th nowrap>残值</th>
               <th style="width:80px;" nowrap>投产日期</th>
               <th nowrap>所属单位</th>
               <th nowrap>使用单位</th>
               <th style="width:200px;" nowrap>原因</th>
               <th nowrap>资产状况</th>
               <th style="width:60px;" nowrap>计量单位</th>
               <th style="width:80px;" nowrap>自编号</th>
               <th nowrap>规格型号</th>
               <th nowrap>制造厂家</th>
               <th style="width:50px;" nowrap>再利用</th>
               <th nowrap>存放地点</th>
               <th style="width:60px;" nowrap>使用年限</th>
               <th style="width:60px;" nowrap>折旧年限</th>
               <th nowrap>备注</th>
            </tr>
            <?     //(sfdb ='n' or sfdb is null) and
              $sql_jldw="select id,zcbh,zcmc,bfwh,bfsj,sl,fhsl,yz,ljzj,zmjz,jzzb,
                  cz,tcrq,ssdw,sydw,bfyy,zczk,jldw,zbh,gghx,zzcj,zly,cfdd,synx,zjnx,bz from z_bfzckp where ssdw='$g_dwmc' and (sfcz='n' or sfcz is null or sfcz='N') and (flzc='n' or flzc is null)  order by zcbh";
              //echo $sql_jldw;
              $result_jldw=OciParse($DBCONN,$sql_jldw);
              ociexecute($result_jldw) or die("<br />查询失败!");
              //$colcount=ocinumcols($result_jldw);//得到的总列数
              $colcount=26;//得到的总列数
              //require('../common/pager_functions.php');//分页函数调用
              $count_num=1;
              while(OciFetchInto ($result_jldw, &$arr)){
                   echo "<tr>\n";
                   echo"<td><input type=\"checkbox\" name=\"sele\" value=\"$arr[0]\" /></td>\n";
                   $c_id1=$arr[0];
                   for($j=1;$j<$colcount;$j++){
                     if($j==5){
                        $c_style="style=\"text-align:right;\"";
                        $arr[$j]=number_format($arr[$j], 0, '.', ',');
                     }elseif($j==6 or $j==7 or $j==8 or $j==9 or $j==10 or $j==11){
                        $arr[$j]=number_format($arr[$j], 2, '.', ',');
                        $c_style="style=\"text-align:right;\"";
                     }elseif($j==12 or $j==4){
                        $c_style="style=\"text-align:center;\"";
                     }else{
                        $c_style="style=\"text-align:left;\"";
                     }
                     echo "<td $c_style>$arr[$j]</td>\n";
                   }
                   echo "</tr>\n";
                   $count_num++;
              } //while结束
              ocifreestatement($result_jldw);
            ?>
            <?
            //补空行
            //$displayrows="13"; //显示的总行数
            //$colcount=7;
            //include('../common/PrintTable.php');
            ?>
         </table>
         <!--<div style="margin-top:10px;text-align:right;">-->
         <? //分页输出
         //echo draw_pager($id,$url,$total_pages,$_GET['page']);
         //echo "共".$total_pages."页,共".$total_rows."条记录&nbsp";
         ?>
         <!--</div>-->
         <!--以下为td间隔换色函数-->
         <script Language="Javascript1.2">
         for (i=0;i<table1.rows.length;i++)
           {
              (i%2==0)?(table1.rows(i).className = "td_chang1")table1.rows(i).className = "td_chang2");
           }
         </script>
         <!--以上为td间隔换色函数-->
      </div><!--表内容区-->
   </div><!--最外层,背景-->
</form>
</body>
</html>
<?ocilogoff($DBCONN);?>
2007-10-13 09:05 AM#1
查看资料  发短消息  顶部
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 


Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 4.005273 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP