SlideShare uma empresa Scribd logo
1 de 66
Baixar para ler offline
© 2009 Oracle Corporation
<Insert Picture Here>




PHP Oracle Web Applications:
Best Practices and Caching Strategies
Kuassi Mensah Server Technologies Oracle
       Mensah,       Technologies,
Agenda

        • ► PHP, the OCI8 Extension and Oracle Database
        • Scaling Database Connectivity
           • Database Resident Connection Pool – Solving the C20K
             Problem
           • Logon Storm Shield
        • Scaling Database Operations
           • Bind Variables, Statement Caching, Row Prefetching
           • Scaling Very Complex Queries
           • Scaling with Stored Procedures
        • Caching Strategies
           • Resultset Caching
           • Continuous Query Notification and Mid-tier Cache
             Invalidation
           • I Memory Database Cache
             In M        D t b    C h

© 2009 Oracle Corporation
PHP and the OCI8 Extension




© 2009 Oracle Corporation
Three Tier Web Model




© 2009 Oracle Corporation
What is OCI8?

        • Main Oracle Database extension for PHP
        • Open source and part of PHP
        • Current version is OCI8 1.3 – in PHP 5.3 and in PECL
         <?php
            $c = oci_connect('un', 'pw', 'localhost/orcl');
            $s = oci_parse($c, 'select * from employees');
            oci_execute($s);
            while (($row = oci_fetch_array($s, OCI_ASSOC)) != false)
              foreach ($row as $item)
                      (             )
                print $item;
         ?>



© 2009 Oracle Corporation
Get the Latest OCI8 1.3

        • php.net
           • PHP 5 3 Source code Windows binaries
                  5.3        code,
        • PECL - PHP Extension Community Library
           • For updating PHP 4 - 5.2 with OCI8 1.3
        • htt //
          http://oss.oracle.com/projects/php
                           l      / j t / h
           • RPMs for Linux with OCI8
        • Unbreakable Linux Network
           • Oracle's Linux Support program
           • OCI8 RPM available for PHP
        • Zend Se e
            e d Server
           • Linux, Windows, Mac
           • Support from Zend



© 2009 Oracle Corporation
Oracle Database 11.1 and PHP

        • Oracle 11.1 was released August 2007
        • Connection Pooling - DRCP
        • Server (database) Query Result Cache
        • Client Query Result Cache
           • Query Annotation
        • Continuous Query Notification
        • Cube Organized Materialized Views
        • Total Recall
        • ...




© 2009 Oracle Corporation
Oracle Database 11.2 and PHP

        • Oracle 11.2 was released September 2009
        • Many new features building on 11gR1 innovations
           • Improved views for DRCP connection pooling
           • Continuous Query Notification for Views
           • Client Query Result Cache
              • Table Annotation
              • View Annotation
           • Client query result cache (CQRC) supported with DRCP
           • Pre-fetching supported in more places
        • Edition Based Redefinition
        • RAC One Node option
        • ...


© 2009 Oracle Corporation
Agenda

        • PHP, the OCI8 Extension and Oracle Database
        • ►Scaling Database Connectivity
           • Database Resident Connection Pool – Solving the C20K
             Problem
           • Logon Storm Shield
        • Scaling Strategies
           • Bind Variables, Statement Caching, Row Prefetching
           • Scaling Very Complex Queries
           • Scaling with Stored Procedures
        • Caching Strategies
           • Resultset Caching
           • Continuous Query Notification and Mid-tier Cache
             Invalidation
           • I Memory Database Cache
             In M        D t b    C h

© 2009 Oracle Corporation
Database Resident
            Connection Pool - Solving
            the C20K problem




© 2009 Oracle Corporation
Standard OCI8 connections

        $c = oci_connect($un, $pw, $db);

        • High CPU Overhead
           • Connection establishment slow
           • Frequent connect and disconnect
        • Does not scale in web environments
           • One database server process per PHP user
           • Maxes out database server memory
        • Cannot handle the Digg effect




© 2009 Oracle Corporation
Persistent OCI8 Connections

         $c = oci_pconnect($un, $pw, $db);

        • Not closable (prior to OCI8 1.3)
        • Fast for subsequent connections
        • Some control configurable in php.ini
               oci8.max_persistent
               oci8.persistent_timeout
               oci8.ping_interval




© 2009 Oracle Corporation
Database Resident Connection Pool
            Solving the C20K Problem
                                               Dedicated servers
        Connection                Connection
        ( DB handle)                Broker

                                                   Session
                                                    Session
                                                      Session
                                                (User Handle)
                                           1           Session
                                                       S i
                                                 (User Handle)
                                                  (User Session
                                                         Handle)
                                                    (User Handle)
                            Oracle Net               (User Handle)

                                  2

           • Pool of dedicated servers
           • (1) Server allocated/locked on Appl Connect
                                             Appl.
           • (2) Direct server access after handoff
           • (3) Server released on Appl. ConnClose .
           • N man-in-the-middle, l
             No       i th     iddl low l t
                                         latency

© 2009 Oracle Corporation
DRCP: System Overview




© 2009 Oracle Corporation
PHP DRCP Benchmark




                                • See PHP DRCPC
                                  Whitepaper
                                • 2GB RAM
                                • 1 connection broker
                                • 100 pooled servers




© 2009 Oracle Corporation
Sample Sizing for 5000 Users
                                     Dedicated      DRCP Servers
                                      Servers       (Pool of 100)

                     Database
                     Servers        5000 * 4 MB      100 * 4 MB

                     Session
                     Memory         5000 * 400 KB    100 * 400 KB

                     DRCP
                     Connection                      5000 * 35 KB
                     Broker
                     Overhead

                     Total Memory     21 GB           610 MB




© 2009 Oracle Corporation
DRCP in PHP

        •       DRCP support is available in OCI8 1.3
              • Developer decision to use it or not
              • DRCP functionality available when linked with Oracle 11g
                client libraries and connected to Oracle 11g
        •       OCI8 1.3 is included in PHP 5.3 and PHP 6
              • For PHP 4.3.9 – 5.2 use PECL OCI8 1.3




© 2009 Oracle Corporation
Configuring and Starting the POOL
        • Install PHP OCI8 1.3 and Oracle 11g
        • Configure the pool (optional)
            SQL
            SQL> execute dbms connection pool.configure pool(
                           dbms_connection_pool.configure_pool(
               pool_name => 'SYS_DEFAULT_CONNECTION_POOL',
                minsize            => 4,
                maxsize                 => 40,
                incrsize           => 2,
                session_cached_cursors      => 20,
                inactivity_timeout      => 300,
                max_think_time
                max think time          => 600
                                           600,
                max_use_session             => 500000,
                max_lifetime_session => 86400);
        • Sart the pool:
              SQL> execute dbms_connection_pool.start_pool();
        • Set oci8.connection_class in php.ini
              oci8.connection_class MY_PHP_APP
              oci8 connection class = MY PHP APP


© 2009 Oracle Corporation
Using the Pool

          1/ Changing the Connect String in PHP Applications
                  <?php
                  $c = oci_pconnect("phpweb", "phpweb",
                    "//localhost/orcl:pooled");
                  $s = oci_parse($c, 'select * from employees');
                  oci_execute($s);
                  oci_fetch_all($s, $res);
                  var_dump($res);
                  var dump($res);
                  ?>

          2/ Zero Code Change
            Change the TNS alias in tnsnames.ora configuration file



© 2009 Oracle Corporation
Some DRCP recommendations.

        • Read the PHP DRCP whitepaper
               http://www.oracle.com/technology/tech/php/index.html
        • Make sure oci8.connection_class is set
        • Have > 1 Broker, but only a few
        • Close connections when doing non-DB processing
        • Explicitly control commits and rollbacks
              • Avoid unexpectedly open transactions when an oci_close() or end-
                of-scope
                of scope occurs
              • Scripts coded like this can use oci_close() to take advantage of
                DRCP but still be portable to older versions of the OCI8 extension
        • Monitor V$CPOOL STATS view to determine best pool size
                  V$CPOOL_STATS




© 2009 Oracle Corporation
Logon Storm Shield




© 2009 Oracle Corporation
Logon Storm Shield

        • Logon Storm
           • On Mid-tier Reboot
           • DoS Attack
        • Logon Storm Shield: Connection Rate Limiter
             g
           • configured in LISTENER.ORA
        LISTENER=(ADDRESS_LIST=
         (ADDRESS=(PROTOCOL=tcp)(HOST=sales)(PORT=1521)(RATE_LIMIT=3))
         (ADDRESS=(PROTOCOL=tcp)(HOST=lmgmt)(PORT=1522)(RATE_LIMIT=no)))


        •     Set the Rate Limit to a value that matches your machine
              capabilities.
                   biliti




© 2009 Oracle Corporation
Agenda

        • PHP, the OCI8 Extension and Oracle Database
        • Scaling Database Connectivity
           • Database Resident Connection Pool – Solving the C20K
             Problem
           • Logon Storm Shield
        • ►Scaling Database Operations
           • Bind Variables, Statement Caching, Row Prefetching
                                              g               g
           • Scaling Very Complex Queries
           • Scaling with Stored Procedures
        • Caching Strategies
           • Resultset Caching
           • Continuous Query Notification and Mid-tier Cache
             Invalidation
           • In Memory Database Cache
© 2009 Oracle Corporation
Bind Variables




© 2009 Oracle Corporation
Not Binding
               Literals in SQL statements disable sharing




                            Poor use of cache



© 2009 Oracle Corporation
Binding Scalars




© 2009 Oracle Corporation
Binding Scalars

         <?php
           $c = oci_connect('hr', 'hrpwd', 'localhost/orcl');
           $s = oci_parse($c,'insert into employees values (:bv)');
           $name = ‘Mensah';
           oci_bind_by_name($s, :bv
           oci bind by name($s ':bv', $name);
           oci_execute($s);
         ?>

        • Associates PHP variable $name with placeholder :bv
        • Similar to JDBC PreparedStmt
        • No SQL Injection worry
        • Easier to write than adding quote escaping



© 2009 Oracle Corporation
DB Statistics Without and With Binding
        From a query example by Tom Kyte:
                                   Not Binding        Binding
        Parse time elapsed                485            36
        Parse count (hard)              5,000             1
        Latches                       328,496       118,614




        • Overall system is more efficient
        • PHP user elapsed time directly benefits



© 2009 Oracle Corporation
Binding Best Practices

        • Set length parameter to your upper data size for re-
          executed IN binds oci_bind_by_name($s, “:b”, $b, 40);
                               _    _ y_    (                )
        • Don't bind constants
              • Let the optimizer see them
        • Long running unique queries may not benefit
           • Parse time is a relatively small cost
        • CURSOR_SHARING parameter
           • S in “
             Set “session” or database init.ora
           • Makes every statement appear to have bound data, but
             optimizer now doesn't see constants
           • For bind-unfriendly applications
                 bind unfriendly
        • Oracle 11g has Adaptive Cursor Sharing
           • Can have multiple execution plans for same statement


© 2009 Oracle Corporation
Statement Caching




© 2009 Oracle Corporation
Client (aka PHP) Statement Caching




                            Less traffic and DB CPU


© 2009 Oracle Corporation
OCI8 Uses the Statement Cache.

        • No PHP code change needed
           • Oracle Client library cache of statement text & meta data
        • On by default in php.ini
               oci8.statement_cache_size
               oci8 statement cache size = 20
          Unit is number of statements
        • Set it big enough for working set of statements
        • Reduces network traffic and context switches
                                ff
           • Moves cache management load from DB to PHP side
           • Uses memory on PHP side for cached statement handles
           • Uses memory on DB for per-session cursors




© 2009 Oracle Corporation
Row Prefetching




© 2009 Oracle Corporation
Prefetching Reduces Roundtrips
        • Temporary buffer cache for query duration




                                              No DB access
                                              for next fetch

                            Reduces round trips
© 2009 Oracle Corporation
Prefetching Improves Query Times




                            Your results will vary


© 2009 Oracle Corporation
Prefetching is Enabled by Default

        • Enabled by default
        • Can tune per statement:

           $s = oci_parse($c, 'select city from locations');
           oci_set_prefetch($s, 200)
             i   t    f t h($ 200);
           oci_execute($s);
           while (($row = oci_fetch_array($s, OCI_ASSOC)) != false)
             foreach ($row as $item)
                print $item;



                  Each database “round trip” prefetches 200 rows



© 2009 Oracle Corporation
PHP OCI8 Row Prefetching.

        • No need to change PHP application
           • Rows are cached internally by Oracle client libraries
        • php.ini oci8.default_prefetch = 100 rows
           • Was 10 rows in OCI8 1.2
        • Oracle 11.2 supports REF CURSOR prefetching too
        • Tuning goal:
           • R d
             Reduce round t i
                          d trips
           • For big data sets: transfer reasonable chunks, not huge sets




© 2009 Oracle Corporation
Scaling Very Complex Queries




© 2009 Oracle Corporation
Scaling Very Complex SQL Queries
    Problem to Solve: Query Sales and Quantity by
    Year,Department, Class and Country

    The SQL Query:
    SELECT SUM(s.quantity) AS quantity, SUM(s.sales) AS sales,
      t.calendar_year_name, p.department_name, c.class_name,
      t calendar year name p department name c class name
      cu.country_name
    FROM times t, products p, channels c, customers cu, sales_fact s
    WHERE p.item_key = s.product AND s.day_key = t.day_key AND
         s.channel = c.channel_key AND
         s.customer = cu.customer_key
    GROUP BY p.department_name, t.calendar_year_name, c.class_name,
    cu.country_name;
    cu country name;




© 2009 Oracle Corporation
Cube Organized Materialized Views
           Transparent to SQL Queries


                            SQL Query                      Materialized Views

    Region
    R i                                 Date
                                        D t


                                               Query
                                               Rewrite


   Product                          Channel
                                               Automatic      OLAP Cube
                                               Refresh
© 2009 Oracle Corporation
Scaling with Stored Procedures




© 2009 Oracle Corporation
Scaling with Stored Procedures
           Java or PL/SQL

                                                      Client
                  Client
                                                      Any Language
                  Any Language
                                                                 Stored Procedure Call

                                  Multiple Unique
                                  SQL Calls

                                                        Java or PL/SQL


                                                      Calls


                            SQL                                SQL


                                                    Up to 10 x Faster!

© 2009 Oracle Corporation
Agenda

        • PHP, the OCI8 Extension and Oracle Database
        • S li
          Scaling D t b
                    Database C Connectivity
                                        ti it
           • Database Resident Connection Pool – Solving the C20K
             Problem
           • Logon Storm Shield
        • Scaling Database OPerations
           • Bind Variables, Statement Caching, Row Prefetching
           • Scaling Very Complex Queries
           • Scaling with Stored Procedures
        • ►Caching Strategies
           • Resultset Caching
           • Continuous Query Notification and Mid-Tier Cache
             Invalidation
           • In Memory Database Cache

© 2009 Oracle Corporation
Resultset Caching




© 2009 Oracle Corporation
Oracle 11g Client & Server Result Caches

        • Results of queries can be cached
           • Server and client (aka PHP) have caches
           • Recommended for small lookup tables
           • Client cache is per-process

        • Caches automatically invalidated by server data
            changes

        • Feature can be configured globally or per client
           • DB parameter:         CLIENT_RESULT_CACHE_SIZE
          Per-client i sqlnet.ora: OCI RESULT CACHE MAX SIZE
          P    li t in l t         OCI_RESULT_CACHE_MAX_SIZE
           • Has a configurable 'lag' time
              • If no roundtrip within defined time, cache assumed stale



© 2009 Oracle Corporation
Oracle 11g Client & Server Result Caches

        • With Oracle 11.2 Table or View Annotation, developer
            or DBA choose tables or view to be cached:
            alter table last_name result_cache
            create view v2 as select /*+ result cache */ col1, coln from t1
        No need to change PHP application


        • With Oracle 11 1 Query Annotation need to add hint
                      11.1       Annotation,
            to queries instead:
                  select /*+ result_cache */ last_name from employees


        • V$RESULT_CACHE_* views show cache usage



© 2009 Oracle Corporation
No DB Access When Client Cache Used


SQL> select parse_calls, executions, sql_text
  from v$sql where sql_text like '%cjcrc%';

PARSE_CALLS
PARSE CALLS EXECUTIONS SQL TEXT            SQL_TEXT
----------- ---------- -----------------------------------
        2        100 select * from cjcrc
        2          2 select /*+ result_cache */ * from cjcrc




 © 2009 Oracle Corporation
Result Caching Test.
$c = oci_pconnect('hr', 'hrpwd', 'localhost/orcl');
$tbls = array('locations', 'departments', 'countries');
foreach ($tbls as $t) {
   $s = oci_parse($c, "select /*+ res lt cache */ * from $t")
        oci parse($c               result_cache          $t");
   oci_execute($s, OCI_DEFAULT);
   while ($row = oci_fetch_array($s, OCI_ASSOC)) {
     foreach ($row as $item) {echo $item "n";}}}
                                      $item. n ;}}}

$ siege -c 20 -t 30S        http://localhost/clientcache.php

Without result cache: select * from $t
Transaction rate: 32.02 trans/sec

With result cache cache: select /*+ result cache */ * from $t
                                    result_cache
Transaction rate: 36.79 trans/sec

Result Caching was approx. 15% better

© 2009 Oracle Corporation
Continuous Query Notification
            and Mid Tier Cache Invalidation
                Mid-Tier




© 2009 Oracle Corporation
Continuous Query Notification

         Problem to solve:
         Be notified when changes in the database invalidates
         an existing query result set
                                                                       2.Upon Change
                                                                       (       p
                                                                       (DMLImpacting   g
             <?php                                                     the result set)
             …
                                  Callout
             4.Invalidate cache
             5.repopulate cache
                 p p
             …
             ?>
                                                                       1. Register
                                            3.Automatic                the query
                  Custom cache                Notification
                                             (Java or PL/SQL database job
                                             as noificaion callback)



© 2009 Oracle Corporation
Example - The Cache Depends On This
             Table

        $ sqlplus cj/cj
        create table cjtesttab (
          group_id number,
          name              varchar2(20)
        );
        insert into cjtesttab values (1, 'alison');
        insert into cjtesttab values (2, 'pearly');
        insert into cjtesttab values (2, 'wenji');




© 2009 Oracle Corporation
Example - The PHP Cache-Updating
           Code

  <?php
     // cache.php
     $g = date('Y-m-d H:i:s').": Table was: ".$_GET[tabname];
     file_put_contents( /tmp/cqn.txt
     file put contents('/tmp/cqn txt', $g);


     // In reality query the table and update the cache:
     // $s = oci_parse($c, "select * from ".$_GET[tabname]);
     // . . .
     // $
        $memcache->set('key', ...);
  ?>




© 2009 Oracle Corporation
Example - Create 'mycallback' PL/SQL
           Procedure
 create or replace procedure mycallback (
          ntfnds in cq_notification$_descriptor) is
     req utl_http.req;
     resp utl_http.resp;
 begin
     if (ntfnds.event_type = dbms_cq_notification.event_querychange) then
      f( f                               f                         )
      req := utl_http.begin_request(
         'http://mycomp.us.oracle.com/~cjones/cache.php&tabname='
         || ntfnds.query_desc_array(1).table_desc_array(1).table_name);
             tf d        d         (1) t bl d          (1) t bl      )
      resp := utl_http.get_response(req);
      utl_http.end_response(resp);
     end if;
 end;
 /




© 2009 Oracle Corporation
Example - Register 'mycallback' for a
            Query
                y
declare
    reginfo cq_notification$_reg_info;
    v_cursor sys_refcursor;
              y           ;
    regid     number;
begin
    reginfo := cq_notification$_reg_info (
     'mycallback',              -- callback function
     dbms_cq_notification.qos_query, -- result-set notification flag
     0, 0, 0);
    regid := dbms_cq_notification.new_reg_start(reginfo);
     open v_cursor for select name from cjtesttab where group_id = 2;
     close v_cursor;
    dbms_cq_notification.reg_end;
end;
/




© 2009 Oracle Corporation
Example Recap

        • Table cjtesttab
        • PHP script http://.../cache.php to update the cache
        • PL/SQL callback procedure mycallback()
        • Registered query
          select name f
             l t        from cjtesttab where group_id = 2;
                               jt tt b h              id 2
           • Aim: refresh mid-tier cache when this query results change




© 2009 Oracle Corporation
Example - In Action

        • Let's update the table:
         update cjtesttab set name = 'c' where group_id = 2;
          p      j                             g   p_      ;
         commit;
        • Output in /tmp/cqn.txt is:
         2009-09-23
         2009 09 23 13:11:39: Table was: CJ.CJTESTTAB
                                          CJ CJTESTTAB
        • Update a different group_id:
         update cjtesttab set name = 'x' where group_id = 1;
         commit;
        • No change notification is generated




© 2009 Oracle Corporation
The following is intended to outline our general
            product direction. It is intended for information
            purposes only, and may not be incorporated into any
            contract. It is not a commitment to deliver any
                 t t i        t          it  t t d li
            material, code, or functionality, and should not be
            relied upon in making purchasing decisions.
            The development, release, and timing of any
            features or functionality described for Oracle’s
            products remain at the sole discretion of Oracle.




© 2009 Oracle Corporation
Challenges with Current Caching
          Mechanisms
      • Cache Currency
              • Content can get stale over time – invalidate or refresh cache
      • R d O l vs. Updatable C h
        Read-Only   U d bl Cache
              • Updates require synchronization with Oracle database
      • Query Capability
             y     p    y
      • Persistence in the Application Tier
      • Availability
              • Should access to data be available if back end database is not
                                                      back-end
                available?
      • Significant Development effort




© 2009 Oracle Corporation
Oracle Database and PHP Roadmap

           • PHP OCI8 integration with
                               g
              • TimesTen In Memory Database
                 • A fast in memory, persistent DB
              • TimesTen In Memory Database Cache
                 • Cache for Oracle Database
              • No need for separate caching logic




© 2009 Oracle Corporation
Extra Slides and Free Stuff




© 2009 Oracle Corporation
DBMS_XA: Transactions Across Requests
        • Oracle 11gR1 Feature
           • Can we use it on the web? Upgrading thick client applications?
        • E
          Example f
                 l from htt //ti
                           http://tinyurl.com/dbmsxaex
                                        l    /db
          HTTP Request #1:
          rc := DBMS_XA.XA_START(DBMS_XA_XID(123), DBMS_XA.TMNOFLAGS);
          UPDATE employees SET salary=salary*1.1 WHERE employee_id = 100
                     l           l      l *1 1            l     id 100;
          rc := DBMS_XA.XA_END(DBMS_XA_XID(123), DBMS_XA.TMSUSPEND);

          HTTP Request #2:
          rc := DBMS_XA.XA_START(DBMS_XA_XID(123), DBMS_XA.TMRESUME);
          SELECT salary INTO s FROM employees WHERE employee_id = 100;
          rc := DBMS_XA.XA_END(DBMS_XA_XID(123), DBMS_XA.TMSUCCESS);
                    _      _     (    _ _     (  )     _               )

          HTTP Request #3:
          rc := DBMS_XA.XA_COMMIT(DBMS_XA_XID(123), TRUE);



© 2009 Oracle Corporation
Hey Look! Free Stuff

        • Oracle Instant Client
           • Easy to install
           • Client libraries for C, C++, Java, .Net access to a remote DB
        • Oracle Database Express Edition (aka “XE”)       XE )
           • Same code base as full database
           • Windows & Linux 32 bit
        • SQL Developer
           • Thick client SQL and PL/SQL development tool
           • Connects to MySQL too
        • Application Express ( Apex )
                                     (“Apex”)
           • Web based Application Development tool
           • Try it at http://apex.oracle.com/


© 2009 Oracle Corporation
Some PHP & Oracle Books




© 2009 Oracle Corporation
Oracle Resources

         • Free Oracle Techology Network (OTN)
         PHP Developer Center: otn.oracle.com/php
            • Free book: Underground PHP and Oracle Manual
            • Whitepapers, Articles, FAQs, links to blogs, JDeveloper
          PHP Extension, PHP RPMs
         • Information
         kuassi.mensah@oracle.com
         db360.blogspot.com
         christopher.jones@oracle.com
         blogs.oracle.com/opal
         • SQL and PL/SQL Questions
         asktom.oracle.com
         • ISVs and hardware vendors
                oraclepartnernetwork.oracle.com
                oraclepartnernetwork oracle com

© 2009 Oracle Corporation
© 2009 Oracle Corporation

Mais conteúdo relacionado

Mais procurados

ORDS - Oracle REST Data Services
ORDS - Oracle REST Data ServicesORDS - Oracle REST Data Services
ORDS - Oracle REST Data ServicesJustin Michael Raj
 
12 Things about Oracle WebLogic Server 12c
12 Things	 about Oracle WebLogic Server 12c12 Things	 about Oracle WebLogic Server 12c
12 Things about Oracle WebLogic Server 12cGuatemala User Group
 
Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Performance Tuning Corporation
 
Oracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerOracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerGuatemala User Group
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015Alex Zaballa
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Alex Zaballa
 
Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!Guatemala User Group
 
Oracle Linux and Oracle Database - A Trusted Combination
Oracle Linux and Oracle Database - A Trusted Combination Oracle Linux and Oracle Database - A Trusted Combination
Oracle Linux and Oracle Database - A Trusted Combination Guatemala User Group
 
Using VirtualBox - Learn Oracle Database 12c and EBS R12
Using VirtualBox - Learn Oracle Database 12c and EBS R12Using VirtualBox - Learn Oracle Database 12c and EBS R12
Using VirtualBox - Learn Oracle Database 12c and EBS R12Biju Thomas
 
Understanding Oracle RAC 11g Release 2 Internals
Understanding Oracle RAC 11g Release 2 InternalsUnderstanding Oracle RAC 11g Release 2 Internals
Understanding Oracle RAC 11g Release 2 InternalsMarkus Michalewicz
 
Performance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12cPerformance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12cAjith Narayanan
 
Lessons Learnt from Oracle Unified Directory implementation with Oracle E-Bus...
Lessons Learnt from Oracle Unified Directory implementation with Oracle E-Bus...Lessons Learnt from Oracle Unified Directory implementation with Oracle E-Bus...
Lessons Learnt from Oracle Unified Directory implementation with Oracle E-Bus...Andrejs Karpovs
 
Oracle RAC 11g Release 2 Client Connections
Oracle RAC 11g Release 2 Client ConnectionsOracle RAC 11g Release 2 Client Connections
Oracle RAC 11g Release 2 Client ConnectionsMarkus Michalewicz
 
Create non-cdb (traditional) oracle database 12c on windows
Create non-cdb (traditional) oracle database 12c on windowsCreate non-cdb (traditional) oracle database 12c on windows
Create non-cdb (traditional) oracle database 12c on windowsBiju Thomas
 

Mais procurados (20)

ORDS - Oracle REST Data Services
ORDS - Oracle REST Data ServicesORDS - Oracle REST Data Services
ORDS - Oracle REST Data Services
 
12 Things about Oracle WebLogic Server 12c
12 Things	 about Oracle WebLogic Server 12c12 Things	 about Oracle WebLogic Server 12c
12 Things about Oracle WebLogic Server 12c
 
Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?
 
Wizard of ORDS
Wizard of ORDSWizard of ORDS
Wizard of ORDS
 
Best Features of Multitenant 12c
Best Features of Multitenant 12cBest Features of Multitenant 12c
Best Features of Multitenant 12c
 
Oracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerOracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with Docker
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
 
Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!
 
Oracle Linux and Oracle Database - A Trusted Combination
Oracle Linux and Oracle Database - A Trusted Combination Oracle Linux and Oracle Database - A Trusted Combination
Oracle Linux and Oracle Database - A Trusted Combination
 
What's next after Upgrade to 12c
What's next after Upgrade to 12cWhat's next after Upgrade to 12c
What's next after Upgrade to 12c
 
Using VirtualBox - Learn Oracle Database 12c and EBS R12
Using VirtualBox - Learn Oracle Database 12c and EBS R12Using VirtualBox - Learn Oracle Database 12c and EBS R12
Using VirtualBox - Learn Oracle Database 12c and EBS R12
 
Understanding Oracle RAC 11g Release 2 Internals
Understanding Oracle RAC 11g Release 2 InternalsUnderstanding Oracle RAC 11g Release 2 Internals
Understanding Oracle RAC 11g Release 2 Internals
 
Performance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12cPerformance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12c
 
Hacking oracle using metasploit
Hacking oracle using metasploitHacking oracle using metasploit
Hacking oracle using metasploit
 
Lessons Learnt from Oracle Unified Directory implementation with Oracle E-Bus...
Lessons Learnt from Oracle Unified Directory implementation with Oracle E-Bus...Lessons Learnt from Oracle Unified Directory implementation with Oracle E-Bus...
Lessons Learnt from Oracle Unified Directory implementation with Oracle E-Bus...
 
Oracle RAC 11g Release 2 Client Connections
Oracle RAC 11g Release 2 Client ConnectionsOracle RAC 11g Release 2 Client Connections
Oracle RAC 11g Release 2 Client Connections
 
10053 otw
10053 otw10053 otw
10053 otw
 
Create non-cdb (traditional) oracle database 12c on windows
Create non-cdb (traditional) oracle database 12c on windowsCreate non-cdb (traditional) oracle database 12c on windows
Create non-cdb (traditional) oracle database 12c on windows
 
Oracle Cloud As Services
Oracle Cloud As ServicesOracle Cloud As Services
Oracle Cloud As Services
 

Destaque

ChinaUnix社区介绍
ChinaUnix社区介绍ChinaUnix社区介绍
ChinaUnix社区介绍send_linux
 
OpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsOpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsPrabindh Sundareson
 
Types and Styles of music videos
Types and Styles of music videosTypes and Styles of music videos
Types and Styles of music videosramshaimran9
 
Prasanth Kumar Nadh Dehydrogenase Subunit 1
Prasanth Kumar Nadh Dehydrogenase Subunit 1Prasanth Kumar Nadh Dehydrogenase Subunit 1
Prasanth Kumar Nadh Dehydrogenase Subunit 1Prasanthperceptron
 
Vesmír 11-2013
Vesmír 11-2013Vesmír 11-2013
Vesmír 11-2013ovrtiska
 
Rba impian-guide-sept-20132
Rba impian-guide-sept-20132Rba impian-guide-sept-20132
Rba impian-guide-sept-20132burhan fuady
 
NPYWC Business Plan
NPYWC Business PlanNPYWC Business Plan
NPYWC Business Plannpywc
 
蘭花草歌
蘭花草歌蘭花草歌
蘭花草歌Ryan Wong
 
YOGA FOR EPILEPSY - PERSON WITH EPILEPSY ARE EMINENT PERSON
YOGA FOR EPILEPSY  - PERSON WITH EPILEPSY ARE EMINENT PERSONYOGA FOR EPILEPSY  - PERSON WITH EPILEPSY ARE EMINENT PERSON
YOGA FOR EPILEPSY - PERSON WITH EPILEPSY ARE EMINENT PERSONArise Roby
 
Cisco 3900 and cisco 2900 series routers
Cisco 3900 and cisco 2900 series routersCisco 3900 and cisco 2900 series routers
Cisco 3900 and cisco 2900 series routers3Anetwork com
 
Hsu Presentation
Hsu PresentationHsu Presentation
Hsu Presentationsealt
 
YV BKI CH10 The Melancholy of Rama
YV BKI CH10 The Melancholy of RamaYV BKI CH10 The Melancholy of Rama
YV BKI CH10 The Melancholy of RamaPardeep Sehgal
 

Destaque (17)

Abc learning-annual-report-2006
Abc learning-annual-report-2006Abc learning-annual-report-2006
Abc learning-annual-report-2006
 
ChinaUnix社区介绍
ChinaUnix社区介绍ChinaUnix社区介绍
ChinaUnix社区介绍
 
OpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsOpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI Platforms
 
Types and Styles of music videos
Types and Styles of music videosTypes and Styles of music videos
Types and Styles of music videos
 
Prasanth Kumar Nadh Dehydrogenase Subunit 1
Prasanth Kumar Nadh Dehydrogenase Subunit 1Prasanth Kumar Nadh Dehydrogenase Subunit 1
Prasanth Kumar Nadh Dehydrogenase Subunit 1
 
Vesmír 11-2013
Vesmír 11-2013Vesmír 11-2013
Vesmír 11-2013
 
Concumer behavior
Concumer behaviorConcumer behavior
Concumer behavior
 
Rba impian-guide-sept-20132
Rba impian-guide-sept-20132Rba impian-guide-sept-20132
Rba impian-guide-sept-20132
 
Groasis Waterboxx - Popular Science Winner of Best of What's New in 2010
Groasis Waterboxx - Popular Science Winner of Best of What's New in 2010Groasis Waterboxx - Popular Science Winner of Best of What's New in 2010
Groasis Waterboxx - Popular Science Winner of Best of What's New in 2010
 
NPYWC Business Plan
NPYWC Business PlanNPYWC Business Plan
NPYWC Business Plan
 
蘭花草歌
蘭花草歌蘭花草歌
蘭花草歌
 
YOGA FOR EPILEPSY - PERSON WITH EPILEPSY ARE EMINENT PERSON
YOGA FOR EPILEPSY  - PERSON WITH EPILEPSY ARE EMINENT PERSONYOGA FOR EPILEPSY  - PERSON WITH EPILEPSY ARE EMINENT PERSON
YOGA FOR EPILEPSY - PERSON WITH EPILEPSY ARE EMINENT PERSON
 
Cisco 3900 and cisco 2900 series routers
Cisco 3900 and cisco 2900 series routersCisco 3900 and cisco 2900 series routers
Cisco 3900 and cisco 2900 series routers
 
L20 Scalability
L20 ScalabilityL20 Scalability
L20 Scalability
 
Hsu Presentation
Hsu PresentationHsu Presentation
Hsu Presentation
 
YV BKI CH10 The Melancholy of Rama
YV BKI CH10 The Melancholy of RamaYV BKI CH10 The Melancholy of Rama
YV BKI CH10 The Melancholy of Rama
 
The Anatomy Of The Idea
The Anatomy Of The IdeaThe Anatomy Of The Idea
The Anatomy Of The Idea
 

Semelhante a PHP Oracle Web Applications by Kuassi Mensah

Solving the C20K problem: Raising the bar in PHP Performance and Scalability
Solving the C20K problem: Raising the bar in PHP Performance and ScalabilitySolving the C20K problem: Raising the bar in PHP Performance and Scalability
Solving the C20K problem: Raising the bar in PHP Performance and ScalabilityZendCon
 
Less06 networking
Less06 networkingLess06 networking
Less06 networkingAmit Bhalla
 
Oracle Cloud DBaaS
Oracle Cloud DBaaSOracle Cloud DBaaS
Oracle Cloud DBaaSArush Jain
 
Solving the C20K Problem: PHP Performance and Scalability
Solving the C20K Problem: PHP Performance and ScalabilitySolving the C20K Problem: PHP Performance and Scalability
Solving the C20K Problem: PHP Performance and Scalabilitywebhostingguy
 
Solving the C20K Problem: PHP Performance and Scalability
Solving the C20K Problem: PHP Performance and ScalabilitySolving the C20K Problem: PHP Performance and Scalability
Solving the C20K Problem: PHP Performance and Scalabilitywebhostingguy
 
"Clouds on the Horizon Get Ready for Drizzle" by David Axmark @ eLiberatica 2009
"Clouds on the Horizon Get Ready for Drizzle" by David Axmark @ eLiberatica 2009"Clouds on the Horizon Get Ready for Drizzle" by David Axmark @ eLiberatica 2009
"Clouds on the Horizon Get Ready for Drizzle" by David Axmark @ eLiberatica 2009eLiberatica
 
Oracle day co_opensource_final
Oracle day co_opensource_finalOracle day co_opensource_final
Oracle day co_opensource_finalManuel Contreras
 
How oracle-uses-idm-chirag-v2
How oracle-uses-idm-chirag-v2How oracle-uses-idm-chirag-v2
How oracle-uses-idm-chirag-v2OracleIDM
 
Oracle Fusion Middleware provisioning with Puppet
Oracle Fusion Middleware provisioning with PuppetOracle Fusion Middleware provisioning with Puppet
Oracle Fusion Middleware provisioning with PuppetEdwin Biemond
 
Surviving the Crisis With the Help of Oracle Database Resource Manager
Surviving the Crisis With the Help of Oracle Database Resource ManagerSurviving the Crisis With the Help of Oracle Database Resource Manager
Surviving the Crisis With the Help of Oracle Database Resource ManagerMaris Elsins
 
Dutch php conference_2010_opm
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opmisnull
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...Frank Munz
 
Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performancepradeepfn
 
[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...
[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...
[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...Insight Technology, Inc.
 
OpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsOpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsHPCC Systems
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMark Swarbrick
 
VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld
 
Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and PerformanceWSO2
 

Semelhante a PHP Oracle Web Applications by Kuassi Mensah (20)

ORACLE
ORACLEORACLE
ORACLE
 
Solving the C20K problem: Raising the bar in PHP Performance and Scalability
Solving the C20K problem: Raising the bar in PHP Performance and ScalabilitySolving the C20K problem: Raising the bar in PHP Performance and Scalability
Solving the C20K problem: Raising the bar in PHP Performance and Scalability
 
Less06 networking
Less06 networkingLess06 networking
Less06 networking
 
Oracle Cloud DBaaS
Oracle Cloud DBaaSOracle Cloud DBaaS
Oracle Cloud DBaaS
 
Solving the C20K Problem: PHP Performance and Scalability
Solving the C20K Problem: PHP Performance and ScalabilitySolving the C20K Problem: PHP Performance and Scalability
Solving the C20K Problem: PHP Performance and Scalability
 
Solving the C20K Problem: PHP Performance and Scalability
Solving the C20K Problem: PHP Performance and ScalabilitySolving the C20K Problem: PHP Performance and Scalability
Solving the C20K Problem: PHP Performance and Scalability
 
Ipc mysql php
Ipc mysql php Ipc mysql php
Ipc mysql php
 
"Clouds on the Horizon Get Ready for Drizzle" by David Axmark @ eLiberatica 2009
"Clouds on the Horizon Get Ready for Drizzle" by David Axmark @ eLiberatica 2009"Clouds on the Horizon Get Ready for Drizzle" by David Axmark @ eLiberatica 2009
"Clouds on the Horizon Get Ready for Drizzle" by David Axmark @ eLiberatica 2009
 
Oracle day co_opensource_final
Oracle day co_opensource_finalOracle day co_opensource_final
Oracle day co_opensource_final
 
How oracle-uses-idm-chirag-v2
How oracle-uses-idm-chirag-v2How oracle-uses-idm-chirag-v2
How oracle-uses-idm-chirag-v2
 
Oracle Fusion Middleware provisioning with Puppet
Oracle Fusion Middleware provisioning with PuppetOracle Fusion Middleware provisioning with Puppet
Oracle Fusion Middleware provisioning with Puppet
 
Surviving the Crisis With the Help of Oracle Database Resource Manager
Surviving the Crisis With the Help of Oracle Database Resource ManagerSurviving the Crisis With the Help of Oracle Database Resource Manager
Surviving the Crisis With the Help of Oracle Database Resource Manager
 
Dutch php conference_2010_opm
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opm
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
 
Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performance
 
[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...
[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...
[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...
 
OpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsOpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC Systems
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats new
 
VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right
 
Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performance
 

Último

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Último (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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)
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

PHP Oracle Web Applications by Kuassi Mensah

  • 1. © 2009 Oracle Corporation
  • 2. <Insert Picture Here> PHP Oracle Web Applications: Best Practices and Caching Strategies Kuassi Mensah Server Technologies Oracle Mensah, Technologies,
  • 3. Agenda • ► PHP, the OCI8 Extension and Oracle Database • Scaling Database Connectivity • Database Resident Connection Pool – Solving the C20K Problem • Logon Storm Shield • Scaling Database Operations • Bind Variables, Statement Caching, Row Prefetching • Scaling Very Complex Queries • Scaling with Stored Procedures • Caching Strategies • Resultset Caching • Continuous Query Notification and Mid-tier Cache Invalidation • I Memory Database Cache In M D t b C h © 2009 Oracle Corporation
  • 4. PHP and the OCI8 Extension © 2009 Oracle Corporation
  • 5. Three Tier Web Model © 2009 Oracle Corporation
  • 6. What is OCI8? • Main Oracle Database extension for PHP • Open source and part of PHP • Current version is OCI8 1.3 – in PHP 5.3 and in PECL <?php $c = oci_connect('un', 'pw', 'localhost/orcl'); $s = oci_parse($c, 'select * from employees'); oci_execute($s); while (($row = oci_fetch_array($s, OCI_ASSOC)) != false) foreach ($row as $item) ( ) print $item; ?> © 2009 Oracle Corporation
  • 7. Get the Latest OCI8 1.3 • php.net • PHP 5 3 Source code Windows binaries 5.3 code, • PECL - PHP Extension Community Library • For updating PHP 4 - 5.2 with OCI8 1.3 • htt // http://oss.oracle.com/projects/php l / j t / h • RPMs for Linux with OCI8 • Unbreakable Linux Network • Oracle's Linux Support program • OCI8 RPM available for PHP • Zend Se e e d Server • Linux, Windows, Mac • Support from Zend © 2009 Oracle Corporation
  • 8. Oracle Database 11.1 and PHP • Oracle 11.1 was released August 2007 • Connection Pooling - DRCP • Server (database) Query Result Cache • Client Query Result Cache • Query Annotation • Continuous Query Notification • Cube Organized Materialized Views • Total Recall • ... © 2009 Oracle Corporation
  • 9. Oracle Database 11.2 and PHP • Oracle 11.2 was released September 2009 • Many new features building on 11gR1 innovations • Improved views for DRCP connection pooling • Continuous Query Notification for Views • Client Query Result Cache • Table Annotation • View Annotation • Client query result cache (CQRC) supported with DRCP • Pre-fetching supported in more places • Edition Based Redefinition • RAC One Node option • ... © 2009 Oracle Corporation
  • 10. Agenda • PHP, the OCI8 Extension and Oracle Database • ►Scaling Database Connectivity • Database Resident Connection Pool – Solving the C20K Problem • Logon Storm Shield • Scaling Strategies • Bind Variables, Statement Caching, Row Prefetching • Scaling Very Complex Queries • Scaling with Stored Procedures • Caching Strategies • Resultset Caching • Continuous Query Notification and Mid-tier Cache Invalidation • I Memory Database Cache In M D t b C h © 2009 Oracle Corporation
  • 11. Database Resident Connection Pool - Solving the C20K problem © 2009 Oracle Corporation
  • 12. Standard OCI8 connections $c = oci_connect($un, $pw, $db); • High CPU Overhead • Connection establishment slow • Frequent connect and disconnect • Does not scale in web environments • One database server process per PHP user • Maxes out database server memory • Cannot handle the Digg effect © 2009 Oracle Corporation
  • 13. Persistent OCI8 Connections $c = oci_pconnect($un, $pw, $db); • Not closable (prior to OCI8 1.3) • Fast for subsequent connections • Some control configurable in php.ini oci8.max_persistent oci8.persistent_timeout oci8.ping_interval © 2009 Oracle Corporation
  • 14. Database Resident Connection Pool Solving the C20K Problem Dedicated servers Connection Connection ( DB handle) Broker Session Session Session (User Handle) 1 Session S i (User Handle) (User Session Handle) (User Handle) Oracle Net (User Handle) 2 • Pool of dedicated servers • (1) Server allocated/locked on Appl Connect Appl. • (2) Direct server access after handoff • (3) Server released on Appl. ConnClose . • N man-in-the-middle, l No i th iddl low l t latency © 2009 Oracle Corporation
  • 15. DRCP: System Overview © 2009 Oracle Corporation
  • 16. PHP DRCP Benchmark • See PHP DRCPC Whitepaper • 2GB RAM • 1 connection broker • 100 pooled servers © 2009 Oracle Corporation
  • 17. Sample Sizing for 5000 Users Dedicated DRCP Servers Servers (Pool of 100) Database Servers 5000 * 4 MB 100 * 4 MB Session Memory 5000 * 400 KB 100 * 400 KB DRCP Connection 5000 * 35 KB Broker Overhead Total Memory 21 GB 610 MB © 2009 Oracle Corporation
  • 18. DRCP in PHP • DRCP support is available in OCI8 1.3 • Developer decision to use it or not • DRCP functionality available when linked with Oracle 11g client libraries and connected to Oracle 11g • OCI8 1.3 is included in PHP 5.3 and PHP 6 • For PHP 4.3.9 – 5.2 use PECL OCI8 1.3 © 2009 Oracle Corporation
  • 19. Configuring and Starting the POOL • Install PHP OCI8 1.3 and Oracle 11g • Configure the pool (optional) SQL SQL> execute dbms connection pool.configure pool( dbms_connection_pool.configure_pool( pool_name => 'SYS_DEFAULT_CONNECTION_POOL', minsize => 4, maxsize => 40, incrsize => 2, session_cached_cursors => 20, inactivity_timeout => 300, max_think_time max think time => 600 600, max_use_session => 500000, max_lifetime_session => 86400); • Sart the pool: SQL> execute dbms_connection_pool.start_pool(); • Set oci8.connection_class in php.ini oci8.connection_class MY_PHP_APP oci8 connection class = MY PHP APP © 2009 Oracle Corporation
  • 20. Using the Pool 1/ Changing the Connect String in PHP Applications <?php $c = oci_pconnect("phpweb", "phpweb", "//localhost/orcl:pooled"); $s = oci_parse($c, 'select * from employees'); oci_execute($s); oci_fetch_all($s, $res); var_dump($res); var dump($res); ?> 2/ Zero Code Change Change the TNS alias in tnsnames.ora configuration file © 2009 Oracle Corporation
  • 21. Some DRCP recommendations. • Read the PHP DRCP whitepaper http://www.oracle.com/technology/tech/php/index.html • Make sure oci8.connection_class is set • Have > 1 Broker, but only a few • Close connections when doing non-DB processing • Explicitly control commits and rollbacks • Avoid unexpectedly open transactions when an oci_close() or end- of-scope of scope occurs • Scripts coded like this can use oci_close() to take advantage of DRCP but still be portable to older versions of the OCI8 extension • Monitor V$CPOOL STATS view to determine best pool size V$CPOOL_STATS © 2009 Oracle Corporation
  • 22. Logon Storm Shield © 2009 Oracle Corporation
  • 23. Logon Storm Shield • Logon Storm • On Mid-tier Reboot • DoS Attack • Logon Storm Shield: Connection Rate Limiter g • configured in LISTENER.ORA LISTENER=(ADDRESS_LIST= (ADDRESS=(PROTOCOL=tcp)(HOST=sales)(PORT=1521)(RATE_LIMIT=3)) (ADDRESS=(PROTOCOL=tcp)(HOST=lmgmt)(PORT=1522)(RATE_LIMIT=no))) • Set the Rate Limit to a value that matches your machine capabilities. biliti © 2009 Oracle Corporation
  • 24. Agenda • PHP, the OCI8 Extension and Oracle Database • Scaling Database Connectivity • Database Resident Connection Pool – Solving the C20K Problem • Logon Storm Shield • ►Scaling Database Operations • Bind Variables, Statement Caching, Row Prefetching g g • Scaling Very Complex Queries • Scaling with Stored Procedures • Caching Strategies • Resultset Caching • Continuous Query Notification and Mid-tier Cache Invalidation • In Memory Database Cache © 2009 Oracle Corporation
  • 25. Bind Variables © 2009 Oracle Corporation
  • 26. Not Binding Literals in SQL statements disable sharing Poor use of cache © 2009 Oracle Corporation
  • 27. Binding Scalars © 2009 Oracle Corporation
  • 28. Binding Scalars <?php $c = oci_connect('hr', 'hrpwd', 'localhost/orcl'); $s = oci_parse($c,'insert into employees values (:bv)'); $name = ‘Mensah'; oci_bind_by_name($s, :bv oci bind by name($s ':bv', $name); oci_execute($s); ?> • Associates PHP variable $name with placeholder :bv • Similar to JDBC PreparedStmt • No SQL Injection worry • Easier to write than adding quote escaping © 2009 Oracle Corporation
  • 29. DB Statistics Without and With Binding From a query example by Tom Kyte: Not Binding Binding Parse time elapsed 485 36 Parse count (hard) 5,000 1 Latches 328,496 118,614 • Overall system is more efficient • PHP user elapsed time directly benefits © 2009 Oracle Corporation
  • 30. Binding Best Practices • Set length parameter to your upper data size for re- executed IN binds oci_bind_by_name($s, “:b”, $b, 40); _ _ y_ ( ) • Don't bind constants • Let the optimizer see them • Long running unique queries may not benefit • Parse time is a relatively small cost • CURSOR_SHARING parameter • S in “ Set “session” or database init.ora • Makes every statement appear to have bound data, but optimizer now doesn't see constants • For bind-unfriendly applications bind unfriendly • Oracle 11g has Adaptive Cursor Sharing • Can have multiple execution plans for same statement © 2009 Oracle Corporation
  • 31. Statement Caching © 2009 Oracle Corporation
  • 32. Client (aka PHP) Statement Caching Less traffic and DB CPU © 2009 Oracle Corporation
  • 33. OCI8 Uses the Statement Cache. • No PHP code change needed • Oracle Client library cache of statement text & meta data • On by default in php.ini oci8.statement_cache_size oci8 statement cache size = 20 Unit is number of statements • Set it big enough for working set of statements • Reduces network traffic and context switches ff • Moves cache management load from DB to PHP side • Uses memory on PHP side for cached statement handles • Uses memory on DB for per-session cursors © 2009 Oracle Corporation
  • 34. Row Prefetching © 2009 Oracle Corporation
  • 35. Prefetching Reduces Roundtrips • Temporary buffer cache for query duration No DB access for next fetch Reduces round trips © 2009 Oracle Corporation
  • 36. Prefetching Improves Query Times Your results will vary © 2009 Oracle Corporation
  • 37. Prefetching is Enabled by Default • Enabled by default • Can tune per statement: $s = oci_parse($c, 'select city from locations'); oci_set_prefetch($s, 200) i t f t h($ 200); oci_execute($s); while (($row = oci_fetch_array($s, OCI_ASSOC)) != false) foreach ($row as $item) print $item; Each database “round trip” prefetches 200 rows © 2009 Oracle Corporation
  • 38. PHP OCI8 Row Prefetching. • No need to change PHP application • Rows are cached internally by Oracle client libraries • php.ini oci8.default_prefetch = 100 rows • Was 10 rows in OCI8 1.2 • Oracle 11.2 supports REF CURSOR prefetching too • Tuning goal: • R d Reduce round t i d trips • For big data sets: transfer reasonable chunks, not huge sets © 2009 Oracle Corporation
  • 39. Scaling Very Complex Queries © 2009 Oracle Corporation
  • 40. Scaling Very Complex SQL Queries Problem to Solve: Query Sales and Quantity by Year,Department, Class and Country The SQL Query: SELECT SUM(s.quantity) AS quantity, SUM(s.sales) AS sales, t.calendar_year_name, p.department_name, c.class_name, t calendar year name p department name c class name cu.country_name FROM times t, products p, channels c, customers cu, sales_fact s WHERE p.item_key = s.product AND s.day_key = t.day_key AND s.channel = c.channel_key AND s.customer = cu.customer_key GROUP BY p.department_name, t.calendar_year_name, c.class_name, cu.country_name; cu country name; © 2009 Oracle Corporation
  • 41. Cube Organized Materialized Views Transparent to SQL Queries SQL Query Materialized Views Region R i Date D t Query Rewrite Product Channel Automatic OLAP Cube Refresh © 2009 Oracle Corporation
  • 42. Scaling with Stored Procedures © 2009 Oracle Corporation
  • 43. Scaling with Stored Procedures Java or PL/SQL Client Client Any Language Any Language Stored Procedure Call Multiple Unique SQL Calls Java or PL/SQL Calls SQL SQL Up to 10 x Faster! © 2009 Oracle Corporation
  • 44. Agenda • PHP, the OCI8 Extension and Oracle Database • S li Scaling D t b Database C Connectivity ti it • Database Resident Connection Pool – Solving the C20K Problem • Logon Storm Shield • Scaling Database OPerations • Bind Variables, Statement Caching, Row Prefetching • Scaling Very Complex Queries • Scaling with Stored Procedures • ►Caching Strategies • Resultset Caching • Continuous Query Notification and Mid-Tier Cache Invalidation • In Memory Database Cache © 2009 Oracle Corporation
  • 45. Resultset Caching © 2009 Oracle Corporation
  • 46. Oracle 11g Client & Server Result Caches • Results of queries can be cached • Server and client (aka PHP) have caches • Recommended for small lookup tables • Client cache is per-process • Caches automatically invalidated by server data changes • Feature can be configured globally or per client • DB parameter: CLIENT_RESULT_CACHE_SIZE Per-client i sqlnet.ora: OCI RESULT CACHE MAX SIZE P li t in l t OCI_RESULT_CACHE_MAX_SIZE • Has a configurable 'lag' time • If no roundtrip within defined time, cache assumed stale © 2009 Oracle Corporation
  • 47. Oracle 11g Client & Server Result Caches • With Oracle 11.2 Table or View Annotation, developer or DBA choose tables or view to be cached: alter table last_name result_cache create view v2 as select /*+ result cache */ col1, coln from t1 No need to change PHP application • With Oracle 11 1 Query Annotation need to add hint 11.1 Annotation, to queries instead: select /*+ result_cache */ last_name from employees • V$RESULT_CACHE_* views show cache usage © 2009 Oracle Corporation
  • 48. No DB Access When Client Cache Used SQL> select parse_calls, executions, sql_text from v$sql where sql_text like '%cjcrc%'; PARSE_CALLS PARSE CALLS EXECUTIONS SQL TEXT SQL_TEXT ----------- ---------- ----------------------------------- 2 100 select * from cjcrc 2 2 select /*+ result_cache */ * from cjcrc © 2009 Oracle Corporation
  • 49. Result Caching Test. $c = oci_pconnect('hr', 'hrpwd', 'localhost/orcl'); $tbls = array('locations', 'departments', 'countries'); foreach ($tbls as $t) { $s = oci_parse($c, "select /*+ res lt cache */ * from $t") oci parse($c result_cache $t"); oci_execute($s, OCI_DEFAULT); while ($row = oci_fetch_array($s, OCI_ASSOC)) { foreach ($row as $item) {echo $item "n";}}} $item. n ;}}} $ siege -c 20 -t 30S http://localhost/clientcache.php Without result cache: select * from $t Transaction rate: 32.02 trans/sec With result cache cache: select /*+ result cache */ * from $t result_cache Transaction rate: 36.79 trans/sec Result Caching was approx. 15% better © 2009 Oracle Corporation
  • 50. Continuous Query Notification and Mid Tier Cache Invalidation Mid-Tier © 2009 Oracle Corporation
  • 51. Continuous Query Notification Problem to solve: Be notified when changes in the database invalidates an existing query result set 2.Upon Change ( p (DMLImpacting g <?php the result set) … Callout 4.Invalidate cache 5.repopulate cache p p … ?> 1. Register 3.Automatic the query Custom cache Notification (Java or PL/SQL database job as noificaion callback) © 2009 Oracle Corporation
  • 52. Example - The Cache Depends On This Table $ sqlplus cj/cj create table cjtesttab ( group_id number, name varchar2(20) ); insert into cjtesttab values (1, 'alison'); insert into cjtesttab values (2, 'pearly'); insert into cjtesttab values (2, 'wenji'); © 2009 Oracle Corporation
  • 53. Example - The PHP Cache-Updating Code <?php // cache.php $g = date('Y-m-d H:i:s').": Table was: ".$_GET[tabname]; file_put_contents( /tmp/cqn.txt file put contents('/tmp/cqn txt', $g); // In reality query the table and update the cache: // $s = oci_parse($c, "select * from ".$_GET[tabname]); // . . . // $ $memcache->set('key', ...); ?> © 2009 Oracle Corporation
  • 54. Example - Create 'mycallback' PL/SQL Procedure create or replace procedure mycallback ( ntfnds in cq_notification$_descriptor) is req utl_http.req; resp utl_http.resp; begin if (ntfnds.event_type = dbms_cq_notification.event_querychange) then f( f f ) req := utl_http.begin_request( 'http://mycomp.us.oracle.com/~cjones/cache.php&tabname=' || ntfnds.query_desc_array(1).table_desc_array(1).table_name); tf d d (1) t bl d (1) t bl ) resp := utl_http.get_response(req); utl_http.end_response(resp); end if; end; / © 2009 Oracle Corporation
  • 55. Example - Register 'mycallback' for a Query y declare reginfo cq_notification$_reg_info; v_cursor sys_refcursor; y ; regid number; begin reginfo := cq_notification$_reg_info ( 'mycallback', -- callback function dbms_cq_notification.qos_query, -- result-set notification flag 0, 0, 0); regid := dbms_cq_notification.new_reg_start(reginfo); open v_cursor for select name from cjtesttab where group_id = 2; close v_cursor; dbms_cq_notification.reg_end; end; / © 2009 Oracle Corporation
  • 56. Example Recap • Table cjtesttab • PHP script http://.../cache.php to update the cache • PL/SQL callback procedure mycallback() • Registered query select name f l t from cjtesttab where group_id = 2; jt tt b h id 2 • Aim: refresh mid-tier cache when this query results change © 2009 Oracle Corporation
  • 57. Example - In Action • Let's update the table: update cjtesttab set name = 'c' where group_id = 2; p j g p_ ; commit; • Output in /tmp/cqn.txt is: 2009-09-23 2009 09 23 13:11:39: Table was: CJ.CJTESTTAB CJ CJTESTTAB • Update a different group_id: update cjtesttab set name = 'x' where group_id = 1; commit; • No change notification is generated © 2009 Oracle Corporation
  • 58. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any t t i t it t t d li material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remain at the sole discretion of Oracle. © 2009 Oracle Corporation
  • 59. Challenges with Current Caching Mechanisms • Cache Currency • Content can get stale over time – invalidate or refresh cache • R d O l vs. Updatable C h Read-Only U d bl Cache • Updates require synchronization with Oracle database • Query Capability y p y • Persistence in the Application Tier • Availability • Should access to data be available if back end database is not back-end available? • Significant Development effort © 2009 Oracle Corporation
  • 60. Oracle Database and PHP Roadmap • PHP OCI8 integration with g • TimesTen In Memory Database • A fast in memory, persistent DB • TimesTen In Memory Database Cache • Cache for Oracle Database • No need for separate caching logic © 2009 Oracle Corporation
  • 61. Extra Slides and Free Stuff © 2009 Oracle Corporation
  • 62. DBMS_XA: Transactions Across Requests • Oracle 11gR1 Feature • Can we use it on the web? Upgrading thick client applications? • E Example f l from htt //ti http://tinyurl.com/dbmsxaex l /db HTTP Request #1: rc := DBMS_XA.XA_START(DBMS_XA_XID(123), DBMS_XA.TMNOFLAGS); UPDATE employees SET salary=salary*1.1 WHERE employee_id = 100 l l l *1 1 l id 100; rc := DBMS_XA.XA_END(DBMS_XA_XID(123), DBMS_XA.TMSUSPEND); HTTP Request #2: rc := DBMS_XA.XA_START(DBMS_XA_XID(123), DBMS_XA.TMRESUME); SELECT salary INTO s FROM employees WHERE employee_id = 100; rc := DBMS_XA.XA_END(DBMS_XA_XID(123), DBMS_XA.TMSUCCESS); _ _ ( _ _ ( ) _ ) HTTP Request #3: rc := DBMS_XA.XA_COMMIT(DBMS_XA_XID(123), TRUE); © 2009 Oracle Corporation
  • 63. Hey Look! Free Stuff • Oracle Instant Client • Easy to install • Client libraries for C, C++, Java, .Net access to a remote DB • Oracle Database Express Edition (aka “XE”) XE ) • Same code base as full database • Windows & Linux 32 bit • SQL Developer • Thick client SQL and PL/SQL development tool • Connects to MySQL too • Application Express ( Apex ) (“Apex”) • Web based Application Development tool • Try it at http://apex.oracle.com/ © 2009 Oracle Corporation
  • 64. Some PHP & Oracle Books © 2009 Oracle Corporation
  • 65. Oracle Resources • Free Oracle Techology Network (OTN) PHP Developer Center: otn.oracle.com/php • Free book: Underground PHP and Oracle Manual • Whitepapers, Articles, FAQs, links to blogs, JDeveloper PHP Extension, PHP RPMs • Information kuassi.mensah@oracle.com db360.blogspot.com christopher.jones@oracle.com blogs.oracle.com/opal • SQL and PL/SQL Questions asktom.oracle.com • ISVs and hardware vendors oraclepartnernetwork.oracle.com oraclepartnernetwork oracle com © 2009 Oracle Corporation
  • 66. © 2009 Oracle Corporation