Legal | Privacy
";
    }
    function do_delete($conn)
    {
      $stmt = "delete from mytable";
      $s = oci_parse($conn, $stmt);
      $r = oci_execute($s);
    }
    function do_insert($conn) {
  $d = date('j:M:y H:i:s');
  $stmt = "insert into mytable values 
    (to_date('" . $d . "', 'DD:MON:YY HH24:MI:SS'))";
  $s = oci_parse($conn, $stmt);
  $r = oci_execute($s, OCI_DEFAULT);
}

$c = oci_connect("hr", "hrpwd", "//localhost/orcl");
$start = currTime();
for ($i = 0; $i < 10000; $i++) {
  do_insert($c);
}
oci_commit($c);
$et = elapsedTime($start);
    echo "Time was ".round($et,3)." seconds
"; do_query($c); // Check insert done do_delete($c); // cleanup committed rows ?>
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy