Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: So how big is your buffer cache ?

RE: So how big is your buffer cache ?

From: Ellis R. Miller <sartre1_at_comcast.net>
Date: Sun, 29 Aug 2004 18:38:26 -0600
Message-ID: <AOEDLEKLOHPKBBLDFCLAAELDEBAA.sartre1@comcast.net>


Recently did some very informal benchmarking of PHP 5, Apache 2, against Oracle 10G on Linux using PHP code form web application I originally developed leveraging PHP 4, Apache 2, and MySQL on Linux. PHP 5 is fully OO compliant and based on my several years of Java programming significantly faster and more efficient in a compromising of MVC sort of way (not so true with PHP 5, by the way, although the flexibility to script-away is still tempting and nice).

A few important notes I thought may be of interest:

PHP 5 and Apache 2 installed on Windows 2000 (Dell desktop) with Oracle 10G client already having been configured to connect to my Oracle 10G on Fedora database. Leveraged the following link for the basic configuration under "Installing as an Apache module:"

http://php.us.themoes.org/manual/en/install.windows.apache2.php

After following these basic instructions along with uncommenting the following in my C:\PHP\php.ini file (showing a partial list below to accentuate the removal of the ";" as it is a simple delimiter to overlook):

;extension=php_mysql.dll
extension=php_oci8.dll
;extension=php_openssl.dll
extension=php_oracle.dll

...I was able to connect to my Oracle 10G Fedora database only after adding the following to my httpd.conf file:

# Set PHP related environmental variables
# Had to do this before I could connect
# Did not try process of elimination to see which one in particular
# may have done the trick (these were all set prior to this
# via the Windows Registry) but read somewhere TNS_ADMIN is the biggie
# man I am lazy as I could verify this in about two seconds or in less time
# than it took to mention this

SetEnv ORACLE_HOME "C:/Oracle/product/10.1.0/Client_1"
SetEnv TNS_ADMIN   "C:/Oracle/product/10.1.0/Client_1/network/admin"
SetEnv ORACLE_SID  "ORCLDEV"

# For PHP5
# configure the path to php.ini

PHPIniDir "C:/php"

Here is some source code that is taken from a couple very basic PHP FAQ's including the one on OTN:

<?php
print "<HTML><PRE>";
$db = "<service_name>";
$c1 = ocilogon("scott","<password_goes_here>",$db);

function select_data($conn)
{ $stmt = ociparse($conn,"select * from emp where ename= :NAME");   $name = 'MILLER';
  OCIBindByName($stmt, ':NAME', $name, -1);   ociexecute($stmt,OCI_DEFAULT);
  echo $conn."----selecting\n\n";
  while (ocifetch($stmt)){

    echo ociresult($stmt,"EMPNO")." ";
    echo ociresult($stmt,"HIREDATE")." ";
    echo ociresult($stmt,"ENAME")."\n";

  }
  echo $conn."----done\n\n";
}

select_data($c1);
ocilogoff($c1);
print "</PRE></HTML>";
?>

PHP 5 is fully OO compliant, has new, improved exception handling including the try...catch syntax from Java, and is wicked fast. Personally, for my money, Oracle 10G on Linux, PHP 5, Apache 2, given the option and appropriate requirements, which I hate to mention as I hate picking up those forms from the DMV in order to start that next "Hello World" IT project, supersedes JSP and ASP .NET, although I have an appreciation for both including the Mono project which is porting .NET to an open source platform:

http://www.mono-project.com/about/

I had Mono once and they way I got it was great:)

PHP 5 is, again, wicked-fast, which is a non-technical, home LAN term for it outperforms the same code written in JSP or ASP .NET by some number I don't wish to publish or argue I am just trying to redeem myself and offer up a very viable if not common-sense alternative.

Keep in mind, unlike J2EE, PHP 5 still does not support connection pooling but one can leverage SQL Relay: http://sqlrelay.sourceforge.net/sqlrelay/

Also, if one cares to track the total number of jobs on Dice including a breakdown of programming languages and operating systems here is a good link:

http://mshiltonj.com/sm/

>From recent articles I have read the PHP number is grossly understated in terms of projects that are currently in the works yet obviously do not require/demand a lot of additional, external resources. Obviously, until there is a bigger install base of mature PHP projects god-fearing IT professionals such as myself will not be in great demand to get that PHP code to return that list of EMP names in under 72 hours:)

Hope someone finds this interesting. Keep in mind, there is also an "add in" or a means by which to extend JDeveloper to support PHP.

Ellis

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Jared Still Sent: Sunday, August 29, 2004 4:50 PM
To: Oracle-L Freelists
Subject: Re: So how big is your buffer cache ?

On Sun, 2004-08-29 at 15:35, Richard Foote wrote:

> Hi Jared,
>
> That would be a real real shame as you do a fantastic job on this list. I
> just think you got it wrong this one time.

Could be. This is taking too much of my time and energy though.

Jared



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Sun Aug 29 2004 - 19:26:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US