up
------------------------------------ 大家帮回答一下这个问题:
http://expert.csdn.net/Expert/topic/2489/2489499.xml?temp=.3179743

解决方案 »

  1.   

    我的测试代码如下:
    <?
    function get_time()
    {
    $mtime=microtime();
    $mtime=explode(" ",$mtime);
    $mtime=doubleval($mtime[1])+doubleval($mtime[0]);
    return ($mtime);
    }
    $time1=get_time();
     $handle = ora_plogon("system/111@oracledb","");
    /*$cursor = ora_open($handle);
    ora_commiton($handle);
    $query = "select * from QS_CS.counts ";
    ora_parse($cursor, $query) or die("");
    ora_exec($cursor);*/$time2=get_time();
    $diff=abs($time2-$time1);
    $diff=number_format($diff, 4); 
    echo $diff."秒";
    ?>
    <br>
    <?$time1=get_time();
     $handle1 = ora_plogon("system/111@oracledb","");
    /*$cursor = ora_open($handle);
    ora_commiton($handle);
    $query = "select * from QS_CS.counts ";
    ora_parse($cursor, $query) or die("");
    ora_exec($cursor);*/$time2=get_time();
    $diff=abs($time2-$time1);
    $diff=number_format($diff, 4); 
    echo $diff."秒 ";
    ?>
    第一次显然很慢。另外,用ora_plogon连接的,用什么语句释放啊?