SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
<Insert Picture Here>




PHP and Oracle - Best Practices and Roadmap
Kuassi Mensah
Group Product Manager, Java Platform Group
http://db360.blogspot.com
PHP and Oracle
    Best Practices and Roadmap
•   Oracle and PHP
•   PHP Oracle Extensions
•   Best Practices for Performance and Scalability
•   What’s New for PHP in Oracle Database 11g
Oracle Commitments to PHP




• Long time commitment to PHP
• Thousands of developers use Oracle and PHP
• Oracle in various PHP communities and expert groups
   • Participate to PHP Events and Conferences
   • Submit Bug Fixes back to the Community
PHP Extensions – Take your Pick

NET Functions, Apache-specific Functions, Alternative PHP Cache, Advanced PHP debugger, Array Functions, Aspell functions [deprecated],
BCMath Arbitrary Precision Mathematics Functions, PHP bytecode Compiler, Bzip2 Compression Functions, Calendar Functions, CCVS API
Functions [deprecated], Class/Object Functions, Classkit Functions, ClibPDF Functions, COM and .Net (Windows), Crack Functions, Character
Type Functions, CURL, Client URL Library Functions, Cybercash Payment Functions, Credit Mutuel CyberMUT functions, Cyrus IMAP
administration Functions, Date and Time Functions, DB++ Functions, Database (dbm-style) Abstraction Layer Functions, dBase Functions, DBM
Functions [deprecated], dbx Functions, Direct IO Functions, Directory Functions, DOM Functions, DOM XML Functions, enchant Functions,
Error Handling and Logging Functions, Exif Functions, Expect Functions, File Alteration Monitor Functions, Forms Data Format Functions,
Fileinfo Functions, filePro Functions, Filesystem Functions, Filter Functions, Firebird/InterBase Functions, Firebird/Interbase Functions
(PDO_FIREBIRD), FriBiDi Functions, FrontBase Functions, FTP Functions, Function Handling Functions, GeoIP Functions, Gettext, GMP
Functions, gnupg Functions, Net_Gopher, hash Functions, HTTP, Hyperwave Functions, Hyperwave API Functions, IBM DB2, Cloudscape and
Apache Derby Functions, ICAP Functions [removed], iconv Functions, ID3 Functions, IIS Administration Functions, Image Functions, IMAP,
POP3 and NNTP Functions, Informix Functions, Informix Functions (PDO_INFORMIX), Ingres II Functions, IRC Gateway Functions, PHP / Java
Integration, JSON Functions, KADM5, LDAP Functions, libxml Functions, Lotus Notes Functions, LZF Functions, Mail Functions, mailparse
Functions, Mathematical Functions, MaxDB PHP Extension, MCAL Functions, Mcrypt Encryption Functions, MCVE (Monetra) Payment
Functions, Memcache Functions, Mhash Functions, Mimetype Functions, Ming functions for Flash, Miscellaneous Functions, mnoGoSearch
Functions, Microsoft SQL Server Functions, Microsoft SQL Server and Sybase Functions (PDO_DBLIB), Mohawk Software Session Handler
Functions, mSQL Functions, Multibyte String Functions, muscat Functions, MySQL Functions, MySQL Functions (PDO_MYSQL), MySQL
Improved Extension, Ncurses Terminal Screen Control Functions, Network Functions, Newt Functions, NSAPI-specific Functions, Object
Aggregation/Composition Functions, Object property and method call overloading, Oracle Functions, ODBC Functions (Unified), ODBC and DB2
Functions (PDO_ODBC), oggvorbis, OpenAL Audio Bindings, OpenSSL Functions, Oracle Functions [deprecated], Oracle Functions
(PDO_OCI), Output Control Functions, Ovrimos SQL Functions, Paradox File Access, Parsekit Functions, Process Control Functions, Regular
Expression Functions (Perl-Compatible), PDF Functions, PDO Functions, PHP Options&Information, POSIX Functions, Regular Expression
Functions (POSIX Extended), PostgreSQL Functions, PostgreSQL Functions (PDO_PGSQL), Printer Functions, Program Execution Functions,
PostScript document creation, Pspell Functions, qtdom Functions, Radius, Rar Functions, GNU Readline, GNU Recode Functions, RPM Header
Reading Functions, runkit Functions, Satellite CORBA client extension [deprecated], SDO Functions, SDO XML Data Access Service Functions,
SDO Relational Data Access Service Functions, Semaphore, Shared Memory and IPC Functions, SESAM Database Functions, PostgreSQL
Session Save Handler, Session Handling Functions, Shared Memory Functions, SimpleXML functions, SNMP Functions, SOAP Functions,
Socket Functions, Standard PHP Library (SPL) Functions, SQLite Functions, SQLite Functions (PDO_SQLITE), Secure Shell2 Functions,
Statistics Functions, Stream Functions, String Functions, Shockwave Flash Functions, Sybase Functions, TCP Wrappers Functions, Tidy
Functions, Tokenizer Functions, Unicode Functions, URL Functions, Variable Handling Functions, Verisign Payflow Pro Functions, vpopmail
Functions, W32api Functions, WDDX Functions, win32ps Functions, win32service Functions, xattr Functions, xdiff Functions, XML Parser
Functions, XML-RPC Functions, XMLReader functions, xmlwriter Functions, XSL functions, XSLT Functions, YAZ Functions, YP/NIS Functions,
Zip File Functions, Zlib Compression Functions,
PHP Oracle Extensions

• OCI8 Extension
  • Improved/Refactored
  • Zend Core for Oracle: Joint effort with Zend
     • Prebuilt stack (Apache, PHP, OCI8 Extension, and Oracle
       Instant Client driver)
     • Enterprise support from Zend
  • php.net
  • PECL
  • Used by ADOdb, PEAR DB and PEAR MDB2
• PDO_OCI
  • php.net
  • PECL
PHP/Oracle: How They Stack Up


               Apache

              PHP
              OCI8 Extension
           Oracle Client
           Libraries 8i, 9i or 10g

                                     Oracle Database
                 Mid Tier
Web User                             8i, 9i or 10g
OCI8 Extension

                                  Easy Connect
• Example                         [//]host[:port][/service_name]

 <?php
   $c = oci_connect('hr', 'hrpw', 'localhost/XE');
   $s = oci_parse($c, 'select city from locations');
   oci_execute($s);
   while ($r = oci_fetch_assoc($s))
      echo $r['CITY'] . quot;<br>quot;;
 ?>
PHP and Oracle
 Best Practices and Roadmap
• Oracle and PHP
• PHP Oracle Extensions
  Best Practices for Performance and Scalability
• What’s New for PHP in Oracle Database 11g
PHP/Oracle: Best Practices for
    Performance and Scalability
•   Connection Management
•   Statement Management
•   Transaction Management
•   Globalization
<Insert Picture Here>



Connection Management
OCI8 Connections


• Non-Persistent Connections
  • Standard Connection
  • Multiple Unique Connections
• Persistent Connections
Non Persistent Connections

Standard Connection
$c = oci_connect($username, $password, $dbname);
• Connection bound to the life of the script
• Second oci_connect() in script returns same DB connection

Multiple Unique Connections
$c = oci_new_connect($username, $password,$dbname);
• Connection bound to the life of the script
• Each oci_new_connect() returns a new DB connection
• Use for independent operations
Costs of Non-Persistent Connections
• High connect times
• Unnecessary connect/disconnect CPU load
Persistent Connections are Cached
oci_pconnect()




         user:db:charset:privilege
         hr:XE:ALU32UTF8:normal
         system:XE:ALU32UTF8:sysdba


                 Connection Cache
Persistent Connections

$c = oci_pconnect($username, $password, $dbname);

•   Not automatically closed at script completion
•   Fast for subsequent connections
     • But holds resources when application idle

•   Configurable in php.ini
     oci8.max_persistent
     oci8.persistent_timeout
     oci8.ping_interval
Costs of Persistent Connections
• Too many connections hanging around
• May Allocate too much memory
• Significant number not doing work
<Insert Picture Here>



Statement Management
SQL Statement Execution

The Steps for Executing a SQL Statement with OCI8:
• Parse - oci_parse
  • Prepares a statement for execution
• Bind - oci_bind_by_name
  • Optionally binds variables in WHERE clause
• Execute – oci_execute
  • The Database executes the statement and buffers the results
• Fetch - oci_fetch_all
  • Optionally retrieves results from the database
Statement Tuning
Reduce Round Trips b/w PHP & Oracle




                      Round Trip




• Row Prefetching
• Server-side Statement Caching
• Client-side Statement Caching
Row Prefetching
Set oci8.default_prefetch

                  PHP                   Database
                        Oracle Client
 OCI8 Extension
                        Libraries
      Beijing               Beijing
                            Bern
                            Bombay
                            ...



                Reduces round trips
OCI8 Prefetch Rows

• “prefetched rows” are cached internally by Oracle
   • Improves query performance by reducing “round trips”
• Default Prefetch Size in php.ini
     oci8.default_prefetch = 10
   • Maximum number of rows in each DB quot;round tripquot;
   • Memory limit of 1024 * oci8.default_prefetch is
     also set
• Value can also be set inline
     oci_set_prefetch($s, 100);
Statement: No Bind Variables
                               select col
                               from tab
                               where v = 1

                               select col
                               from tab
select col                     where v = 2
from tab
where v = 1


                                        1: select col from
                                        tab where v = 1
              Poor use of db            2: select col from
select col
              pool                      tab where v = 2
from tab
where v = 2
                                             Database cache
Statement Caching: Bind Variables
   Server-side Statement cache
                                    select col
                                    from tab
                                    where v = :bv

                                    select col
                                    from tab
select col                          where v = :bv
from tab
where v = :bv


                     Increases
                                             1: select col from
                     performance
                                             tab where v = :bv
select col           and security
from tab
where v = :bv
                                                Database cache
Statement Caching - OCI8 Bind

$s = oci_parse($c,quot;select last_name from employees
        where employee_id = :eidbvquot;);
$myeid = 101;
oci_bind_by_name($s, quot;:EIDBVquot;, $myeid);
oci_execute($s);
oci_fetch_all($s, $res);
echo quot;Last name is:quot;
  .$res['LAST_NAME'][0].quot;<br>nquot;;

$myeid = 102;
oci_execute($s);   // No need to re-parse
oci_fetch_all($s, $res);
echo quot;Last name is: quot;
  . $res['LAST_NAME'][0] .quot;<br>nquot;;
Client-side Statement Caching
   Set oci8.statement_cache_size
                                      select col
                                      from tab



select col                         “Use statement 1”
from tab




               1: select col from tab        1: select col from tab
select col
from tab

                    Client cache                   Database cache
OCI8 Client-side Statement Cache

• OCI8 extension has client side statement cache
• php.ini
    oci8.statement_cache_size = 20
• Moves statement cache management load from DB
  to PHP side
• Uses memory on PHP side for cached statement
  handles
• Uses memory on DB for session cursors
<Insert Picture Here>



Transaction Management
Auto Commit

 By default oci_execute() auto-commits
 function do_simple_insert($conn, $array)
 {
     foreach ($array as $v) {
         $s = oci_parse($conn,
         quot;insert into ptab (pdata) values ('quot;.$v.quot;')quot;);
         $r = oci_execute($s);
     }
 }

This is slow and not a not a good practice
Explicit Commit

function do_transactional_insert($conn, $array)
{
    $s = oci_parse($conn,
           'insert into ptab (pdata) values (:bv)');
    oci_bind_by_name($s, ':bv', $v, 20, SQLT_CHR);
    foreach ($array as $v)
     $r = oci_execute($s, OCI_DEFAULT);
    oci_commit($con);
}

This is fast
Bulk Inserts (PHP Code)

function do_bulk_insert($conn, $array)
{
    $s = oci_parse($conn,
             'begin mypkg.myproc(:c1); end;');
    oci_bind_array_by_name($s, quot;:c1quot;, $array,
             count($array), -1, SQLT_CHR);
    oci_execute($s);
}



Could be fastest
Bulk Inserts (PL/SQL Stored Proc.)
create or replace package mypkg as
 type arrtype is table of varchar2(20)
   index by pls_integer;
 procedure myproc(p1 in arrtype);
end mypkg;
create or replace package body mypkg as
 procedure myproc(p1 in arrtype) is
 begin
   forall i in indices of p1
     insert into ptab values (p1(i));
 end myproc;
end mypkg;
Globalization

• Globalization in OCI8 is built-in, inherited from OCI
• Mostly transparent to PHP applications
   • NLS_LANG defines the Oracle Locale
     <language>_<territory>.<character set>
      GERMAN.GERMANY.AL32UTF8
   • Retrieve User Locale from the Browser ISO locale setting
     $s = $_SERVER[“HTTP_ACCEPT_LANGUAGE”]
   • Multibytes character manipulation requires PHP mbstring or iconv
     libraries
     - Enable mbstring extension
     - set mbstring.func_overload
   • PHP applications that call PL/SQL should also map ISO locale to
     NLS_LANGUAGE and NLS_TERRITORY
• See “The Underground PHP and Oracle Manual” for more
  details.
PHP and Oracle
 Best Practices and Roadmap
• Oracle and PHP
• PHP Oracle Extensions
• Best Practices for Performance and Scalability
  What’s New for PHP in Oracle Database 11g
Will be including New Features for PHP as soon as
the Oracle Database 11g is announced, pretty soon!
Apologies for the delay.
                   Kuassi Mensah
Oracle PHP Developer Center
OTN PHP Developer Center

• www.oracle.com/technology/php
• Underground PHP and Oracle Manual
• Articles, FAQs, links to blogs, JDeveloper PHP Extension,
  Zend Core for Oracle
• ISVs and hardware vendors
       oraclepartnernetwork.oracle.com
• Contacts/Blogs
   •    christopher.jones@oracle.com
   •    kuassi.mensah@oracle.com
   •    blogs.oracle.com/opal
   •    db360.blogspot.com

Más contenido relacionado

La actualidad más candente

Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQLI Goo Lee
 
MySQL Backup and Security Best Practices
MySQL Backup and Security Best PracticesMySQL Backup and Security Best Practices
MySQL Backup and Security Best PracticesLenz Grimmer
 
Memcached Code Camp 2009
Memcached Code Camp 2009Memcached Code Camp 2009
Memcached Code Camp 2009NorthScale
 
REST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using RESTREST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using RESTChristian Gohmann
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourRonald Bradford
 
Moxi - Memcached Proxy
Moxi - Memcached ProxyMoxi - Memcached Proxy
Moxi - Memcached ProxyNorthScale
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMark Swarbrick
 
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql  - how do pdo, mysq-li, and x devapi do what they doPhp &amp; my sql  - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they doDave Stokes
 
Best Practices - PHP and the Oracle Database
Best Practices - PHP and the Oracle DatabaseBest Practices - PHP and the Oracle Database
Best Practices - PHP and the Oracle DatabaseChristopher Jones
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Ontico
 
Tx lf propercareandfeedmysql
Tx lf propercareandfeedmysqlTx lf propercareandfeedmysql
Tx lf propercareandfeedmysqlDave Stokes
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBParallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBMydbops
 
Using advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/JUsing advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/JMariaDB plc
 
03 h base-2-installation_andshell
03 h base-2-installation_andshell03 h base-2-installation_andshell
03 h base-2-installation_andshelldntth0601
 

La actualidad más candente (20)

Cassandra as Memcache
Cassandra as MemcacheCassandra as Memcache
Cassandra as Memcache
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQL
 
MySQL Backup and Security Best Practices
MySQL Backup and Security Best PracticesMySQL Backup and Security Best Practices
MySQL Backup and Security Best Practices
 
Memcached Code Camp 2009
Memcached Code Camp 2009Memcached Code Camp 2009
Memcached Code Camp 2009
 
REST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using RESTREST in Piece - Administration of an Oracle Cluster/Database using REST
REST in Piece - Administration of an Oracle Cluster/Database using REST
 
MySQL Monitoring 101
MySQL Monitoring 101MySQL Monitoring 101
MySQL Monitoring 101
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD Tour
 
Moxi - Memcached Proxy
Moxi - Memcached ProxyMoxi - Memcached Proxy
Moxi - Memcached Proxy
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
 
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql  - how do pdo, mysq-li, and x devapi do what they doPhp &amp; my sql  - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
 
Oracle Essentials Oracle Database 11g
Oracle Essentials   Oracle Database 11gOracle Essentials   Oracle Database 11g
Oracle Essentials Oracle Database 11g
 
MySQL Tuning
MySQL TuningMySQL Tuning
MySQL Tuning
 
Best Practices - PHP and the Oracle Database
Best Practices - PHP and the Oracle DatabaseBest Practices - PHP and the Oracle Database
Best Practices - PHP and the Oracle Database
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
 
Tx lf propercareandfeedmysql
Tx lf propercareandfeedmysqlTx lf propercareandfeedmysql
Tx lf propercareandfeedmysql
 
Oracle Cloud As Services
Oracle Cloud As ServicesOracle Cloud As Services
Oracle Cloud As Services
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBParallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDB
 
Using advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/JUsing advanced options in MariaDB Connector/J
Using advanced options in MariaDB Connector/J
 
Best Features of Multitenant 12c
Best Features of Multitenant 12cBest Features of Multitenant 12c
Best Features of Multitenant 12c
 
03 h base-2-installation_andshell
03 h base-2-installation_andshell03 h base-2-installation_andshell
03 h base-2-installation_andshell
 

Similar a DPC2007 PHP And Oracle (Kuassi Mensah)

java database connectivity for java programming
java database connectivity for java programmingjava database connectivity for java programming
java database connectivity for java programmingrinky1234
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发shaokun
 
Load Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - SlidesLoad Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - SlidesSeveralnines
 
Java MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & OptimizationJava MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & OptimizationKenny Gryp
 
Tips
TipsTips
Tipsmclee
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationBen Hall
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
PHP Performance with APC + Memcached
PHP Performance with APC + MemcachedPHP Performance with APC + Memcached
PHP Performance with APC + MemcachedFord AntiTrust
 
TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practiceaegloff
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performancerudib
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBXESUG
 
Php classes in mumbai
Php classes in mumbaiPhp classes in mumbai
Php classes in mumbaiaadi Surve
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
K8s best practices from the field!
K8s best practices from the field!K8s best practices from the field!
K8s best practices from the field!DoiT International
 

Similar a DPC2007 PHP And Oracle (Kuassi Mensah) (20)

java database connectivity for java programming
java database connectivity for java programmingjava database connectivity for java programming
java database connectivity for java programming
 
Ipc mysql php
Ipc mysql php Ipc mysql php
Ipc mysql php
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发
 
Load Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - SlidesLoad Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - Slides
 
Java MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & OptimizationJava MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & Optimization
 
HiveServer2
HiveServer2HiveServer2
HiveServer2
 
Tips
TipsTips
Tips
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
Vidoop CouchDB Talk
Vidoop CouchDB TalkVidoop CouchDB Talk
Vidoop CouchDB Talk
 
MySQL Proxy tutorial
MySQL Proxy tutorialMySQL Proxy tutorial
MySQL Proxy tutorial
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
PHP Performance with APC + Memcached
PHP Performance with APC + MemcachedPHP Performance with APC + Memcached
PHP Performance with APC + Memcached
 
TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practice
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
 
Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289
 
Php classes in mumbai
Php classes in mumbaiPhp classes in mumbai
Php classes in mumbai
 
Oracle adapters for Ruby ORMs
Oracle adapters for Ruby ORMsOracle adapters for Ruby ORMs
Oracle adapters for Ruby ORMs
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
K8s best practices from the field!
K8s best practices from the field!K8s best practices from the field!
K8s best practices from the field!
 

Más de dpc

ezComponents - Derick Rethans
ezComponents - Derick RethansezComponents - Derick Rethans
ezComponents - Derick Rethansdpc
 
Software And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco TabiniSoftware And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco Tabinidpc
 
Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchelldpc
 
Best Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'PhinneyBest Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'Phinneydpc
 
State Of PHP - Zeev Suraski
State Of PHP - Zeev SuraskiState Of PHP - Zeev Suraski
State Of PHP - Zeev Suraskidpc
 
Symfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien PotencierSymfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien Potencierdpc
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broersedpc
 
New Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian BergmannNew Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian Bergmanndpc
 
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan PriebschPHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebschdpc
 
Quality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian BergmannQuality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian Bergmanndpc
 
An Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord AulkeAn Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord Aulkedpc
 
Enterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo JanschEnterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo Janschdpc
 
DPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo JanschDPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo Janschdpc
 
DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)dpc
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)dpc
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)dpc
 
DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)dpc
 
DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)dpc
 
DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)dpc
 
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)dpc
 

Más de dpc (20)

ezComponents - Derick Rethans
ezComponents - Derick RethansezComponents - Derick Rethans
ezComponents - Derick Rethans
 
Software And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco TabiniSoftware And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco Tabini
 
Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchell
 
Best Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'PhinneyBest Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'Phinney
 
State Of PHP - Zeev Suraski
State Of PHP - Zeev SuraskiState Of PHP - Zeev Suraski
State Of PHP - Zeev Suraski
 
Symfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien PotencierSymfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien Potencier
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broerse
 
New Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian BergmannNew Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian Bergmann
 
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan PriebschPHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
 
Quality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian BergmannQuality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian Bergmann
 
An Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord AulkeAn Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord Aulke
 
Enterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo JanschEnterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo Jansch
 
DPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo JanschDPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo Jansch
 
DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)
 
DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)
 
DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)
 
DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)
 
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

DPC2007 PHP And Oracle (Kuassi Mensah)

  • 1. <Insert Picture Here> PHP and Oracle - Best Practices and Roadmap Kuassi Mensah Group Product Manager, Java Platform Group http://db360.blogspot.com
  • 2. PHP and Oracle Best Practices and Roadmap • Oracle and PHP • PHP Oracle Extensions • Best Practices for Performance and Scalability • What’s New for PHP in Oracle Database 11g
  • 3. Oracle Commitments to PHP • Long time commitment to PHP • Thousands of developers use Oracle and PHP • Oracle in various PHP communities and expert groups • Participate to PHP Events and Conferences • Submit Bug Fixes back to the Community
  • 4. PHP Extensions – Take your Pick NET Functions, Apache-specific Functions, Alternative PHP Cache, Advanced PHP debugger, Array Functions, Aspell functions [deprecated], BCMath Arbitrary Precision Mathematics Functions, PHP bytecode Compiler, Bzip2 Compression Functions, Calendar Functions, CCVS API Functions [deprecated], Class/Object Functions, Classkit Functions, ClibPDF Functions, COM and .Net (Windows), Crack Functions, Character Type Functions, CURL, Client URL Library Functions, Cybercash Payment Functions, Credit Mutuel CyberMUT functions, Cyrus IMAP administration Functions, Date and Time Functions, DB++ Functions, Database (dbm-style) Abstraction Layer Functions, dBase Functions, DBM Functions [deprecated], dbx Functions, Direct IO Functions, Directory Functions, DOM Functions, DOM XML Functions, enchant Functions, Error Handling and Logging Functions, Exif Functions, Expect Functions, File Alteration Monitor Functions, Forms Data Format Functions, Fileinfo Functions, filePro Functions, Filesystem Functions, Filter Functions, Firebird/InterBase Functions, Firebird/Interbase Functions (PDO_FIREBIRD), FriBiDi Functions, FrontBase Functions, FTP Functions, Function Handling Functions, GeoIP Functions, Gettext, GMP Functions, gnupg Functions, Net_Gopher, hash Functions, HTTP, Hyperwave Functions, Hyperwave API Functions, IBM DB2, Cloudscape and Apache Derby Functions, ICAP Functions [removed], iconv Functions, ID3 Functions, IIS Administration Functions, Image Functions, IMAP, POP3 and NNTP Functions, Informix Functions, Informix Functions (PDO_INFORMIX), Ingres II Functions, IRC Gateway Functions, PHP / Java Integration, JSON Functions, KADM5, LDAP Functions, libxml Functions, Lotus Notes Functions, LZF Functions, Mail Functions, mailparse Functions, Mathematical Functions, MaxDB PHP Extension, MCAL Functions, Mcrypt Encryption Functions, MCVE (Monetra) Payment Functions, Memcache Functions, Mhash Functions, Mimetype Functions, Ming functions for Flash, Miscellaneous Functions, mnoGoSearch Functions, Microsoft SQL Server Functions, Microsoft SQL Server and Sybase Functions (PDO_DBLIB), Mohawk Software Session Handler Functions, mSQL Functions, Multibyte String Functions, muscat Functions, MySQL Functions, MySQL Functions (PDO_MYSQL), MySQL Improved Extension, Ncurses Terminal Screen Control Functions, Network Functions, Newt Functions, NSAPI-specific Functions, Object Aggregation/Composition Functions, Object property and method call overloading, Oracle Functions, ODBC Functions (Unified), ODBC and DB2 Functions (PDO_ODBC), oggvorbis, OpenAL Audio Bindings, OpenSSL Functions, Oracle Functions [deprecated], Oracle Functions (PDO_OCI), Output Control Functions, Ovrimos SQL Functions, Paradox File Access, Parsekit Functions, Process Control Functions, Regular Expression Functions (Perl-Compatible), PDF Functions, PDO Functions, PHP Options&Information, POSIX Functions, Regular Expression Functions (POSIX Extended), PostgreSQL Functions, PostgreSQL Functions (PDO_PGSQL), Printer Functions, Program Execution Functions, PostScript document creation, Pspell Functions, qtdom Functions, Radius, Rar Functions, GNU Readline, GNU Recode Functions, RPM Header Reading Functions, runkit Functions, Satellite CORBA client extension [deprecated], SDO Functions, SDO XML Data Access Service Functions, SDO Relational Data Access Service Functions, Semaphore, Shared Memory and IPC Functions, SESAM Database Functions, PostgreSQL Session Save Handler, Session Handling Functions, Shared Memory Functions, SimpleXML functions, SNMP Functions, SOAP Functions, Socket Functions, Standard PHP Library (SPL) Functions, SQLite Functions, SQLite Functions (PDO_SQLITE), Secure Shell2 Functions, Statistics Functions, Stream Functions, String Functions, Shockwave Flash Functions, Sybase Functions, TCP Wrappers Functions, Tidy Functions, Tokenizer Functions, Unicode Functions, URL Functions, Variable Handling Functions, Verisign Payflow Pro Functions, vpopmail Functions, W32api Functions, WDDX Functions, win32ps Functions, win32service Functions, xattr Functions, xdiff Functions, XML Parser Functions, XML-RPC Functions, XMLReader functions, xmlwriter Functions, XSL functions, XSLT Functions, YAZ Functions, YP/NIS Functions, Zip File Functions, Zlib Compression Functions,
  • 5. PHP Oracle Extensions • OCI8 Extension • Improved/Refactored • Zend Core for Oracle: Joint effort with Zend • Prebuilt stack (Apache, PHP, OCI8 Extension, and Oracle Instant Client driver) • Enterprise support from Zend • php.net • PECL • Used by ADOdb, PEAR DB and PEAR MDB2 • PDO_OCI • php.net • PECL
  • 6. PHP/Oracle: How They Stack Up Apache PHP OCI8 Extension Oracle Client Libraries 8i, 9i or 10g Oracle Database Mid Tier Web User 8i, 9i or 10g
  • 7. OCI8 Extension Easy Connect • Example [//]host[:port][/service_name] <?php $c = oci_connect('hr', 'hrpw', 'localhost/XE'); $s = oci_parse($c, 'select city from locations'); oci_execute($s); while ($r = oci_fetch_assoc($s)) echo $r['CITY'] . quot;<br>quot;; ?>
  • 8. PHP and Oracle Best Practices and Roadmap • Oracle and PHP • PHP Oracle Extensions Best Practices for Performance and Scalability • What’s New for PHP in Oracle Database 11g
  • 9. PHP/Oracle: Best Practices for Performance and Scalability • Connection Management • Statement Management • Transaction Management • Globalization
  • 11. OCI8 Connections • Non-Persistent Connections • Standard Connection • Multiple Unique Connections • Persistent Connections
  • 12. Non Persistent Connections Standard Connection $c = oci_connect($username, $password, $dbname); • Connection bound to the life of the script • Second oci_connect() in script returns same DB connection Multiple Unique Connections $c = oci_new_connect($username, $password,$dbname); • Connection bound to the life of the script • Each oci_new_connect() returns a new DB connection • Use for independent operations Costs of Non-Persistent Connections • High connect times • Unnecessary connect/disconnect CPU load
  • 13. Persistent Connections are Cached oci_pconnect() user:db:charset:privilege hr:XE:ALU32UTF8:normal system:XE:ALU32UTF8:sysdba Connection Cache
  • 14. Persistent Connections $c = oci_pconnect($username, $password, $dbname); • Not automatically closed at script completion • Fast for subsequent connections • But holds resources when application idle • Configurable in php.ini oci8.max_persistent oci8.persistent_timeout oci8.ping_interval Costs of Persistent Connections • Too many connections hanging around • May Allocate too much memory • Significant number not doing work
  • 16. SQL Statement Execution The Steps for Executing a SQL Statement with OCI8: • Parse - oci_parse • Prepares a statement for execution • Bind - oci_bind_by_name • Optionally binds variables in WHERE clause • Execute – oci_execute • The Database executes the statement and buffers the results • Fetch - oci_fetch_all • Optionally retrieves results from the database
  • 17. Statement Tuning Reduce Round Trips b/w PHP & Oracle Round Trip • Row Prefetching • Server-side Statement Caching • Client-side Statement Caching
  • 18. Row Prefetching Set oci8.default_prefetch PHP Database Oracle Client OCI8 Extension Libraries Beijing Beijing Bern Bombay ... Reduces round trips
  • 19. OCI8 Prefetch Rows • “prefetched rows” are cached internally by Oracle • Improves query performance by reducing “round trips” • Default Prefetch Size in php.ini oci8.default_prefetch = 10 • Maximum number of rows in each DB quot;round tripquot; • Memory limit of 1024 * oci8.default_prefetch is also set • Value can also be set inline oci_set_prefetch($s, 100);
  • 20. Statement: No Bind Variables select col from tab where v = 1 select col from tab select col where v = 2 from tab where v = 1 1: select col from tab where v = 1 Poor use of db 2: select col from select col pool tab where v = 2 from tab where v = 2 Database cache
  • 21. Statement Caching: Bind Variables Server-side Statement cache select col from tab where v = :bv select col from tab select col where v = :bv from tab where v = :bv Increases 1: select col from performance tab where v = :bv select col and security from tab where v = :bv Database cache
  • 22. Statement Caching - OCI8 Bind $s = oci_parse($c,quot;select last_name from employees where employee_id = :eidbvquot;); $myeid = 101; oci_bind_by_name($s, quot;:EIDBVquot;, $myeid); oci_execute($s); oci_fetch_all($s, $res); echo quot;Last name is:quot; .$res['LAST_NAME'][0].quot;<br>nquot;; $myeid = 102; oci_execute($s); // No need to re-parse oci_fetch_all($s, $res); echo quot;Last name is: quot; . $res['LAST_NAME'][0] .quot;<br>nquot;;
  • 23. Client-side Statement Caching Set oci8.statement_cache_size select col from tab select col “Use statement 1” from tab 1: select col from tab 1: select col from tab select col from tab Client cache Database cache
  • 24. OCI8 Client-side Statement Cache • OCI8 extension has client side statement cache • php.ini oci8.statement_cache_size = 20 • Moves statement cache management load from DB to PHP side • Uses memory on PHP side for cached statement handles • Uses memory on DB for session cursors
  • 26. Auto Commit By default oci_execute() auto-commits function do_simple_insert($conn, $array) { foreach ($array as $v) { $s = oci_parse($conn, quot;insert into ptab (pdata) values ('quot;.$v.quot;')quot;); $r = oci_execute($s); } } This is slow and not a not a good practice
  • 27. Explicit Commit function do_transactional_insert($conn, $array) { $s = oci_parse($conn, 'insert into ptab (pdata) values (:bv)'); oci_bind_by_name($s, ':bv', $v, 20, SQLT_CHR); foreach ($array as $v) $r = oci_execute($s, OCI_DEFAULT); oci_commit($con); } This is fast
  • 28. Bulk Inserts (PHP Code) function do_bulk_insert($conn, $array) { $s = oci_parse($conn, 'begin mypkg.myproc(:c1); end;'); oci_bind_array_by_name($s, quot;:c1quot;, $array, count($array), -1, SQLT_CHR); oci_execute($s); } Could be fastest
  • 29. Bulk Inserts (PL/SQL Stored Proc.) create or replace package mypkg as type arrtype is table of varchar2(20) index by pls_integer; procedure myproc(p1 in arrtype); end mypkg; create or replace package body mypkg as procedure myproc(p1 in arrtype) is begin forall i in indices of p1 insert into ptab values (p1(i)); end myproc; end mypkg;
  • 30. Globalization • Globalization in OCI8 is built-in, inherited from OCI • Mostly transparent to PHP applications • NLS_LANG defines the Oracle Locale <language>_<territory>.<character set> GERMAN.GERMANY.AL32UTF8 • Retrieve User Locale from the Browser ISO locale setting $s = $_SERVER[“HTTP_ACCEPT_LANGUAGE”] • Multibytes character manipulation requires PHP mbstring or iconv libraries - Enable mbstring extension - set mbstring.func_overload • PHP applications that call PL/SQL should also map ISO locale to NLS_LANGUAGE and NLS_TERRITORY • See “The Underground PHP and Oracle Manual” for more details.
  • 31. PHP and Oracle Best Practices and Roadmap • Oracle and PHP • PHP Oracle Extensions • Best Practices for Performance and Scalability What’s New for PHP in Oracle Database 11g
  • 32. Will be including New Features for PHP as soon as the Oracle Database 11g is announced, pretty soon! Apologies for the delay. Kuassi Mensah
  • 34. OTN PHP Developer Center • www.oracle.com/technology/php • Underground PHP and Oracle Manual • Articles, FAQs, links to blogs, JDeveloper PHP Extension, Zend Core for Oracle • ISVs and hardware vendors oraclepartnernetwork.oracle.com • Contacts/Blogs • christopher.jones@oracle.com • kuassi.mensah@oracle.com • blogs.oracle.com/opal • db360.blogspot.com