Professional Documents
Culture Documents
Oracle20140708 DL PDF
Oracle20140708 DL PDF
Oracle20140708 DL PDF
Genetics
get flabbergasted...
SCAN THIS PAGE
WITH LAYAR APP FOR
ADDED EXPERIENCE
SUCCESS
ON SPARC
The latest SPARC chips and
systems are at the center of
better business processes
2 VOLUME XXVIII - ISSUE 4 CONTENTS
SUCCESS
ON SPARC
Consolidating older and underperforming
servers onto newer and more-efficient servers
running a high-performance operating system
and low-overhead virtualization technology adds
new enterprise capacity and processing power
to cost-cutting consolidation projects. Read how
organizations are turning to the new generation
of SPARC servers and the Oracle Solaris
operating system for better business processes
and a better bottom line. Philip J. Gill
Cover: I-Hua Chen / 26
Editorial
Editor in ChiefTom Haunerttom.haunert@oracle.com
Managing EditorJan Rogersjan.rogers@oracle.com
Associate Editor Patty Waddington
Contributing Editor and Writer Blair Campbell
Technology Advisor Tom Kyte
Contributors Rich Schwerin, Leslie Steere
DESIGN
Senior Creative Director Francisco G Delgadillo
Senior Design Director Suemi Lam
Design Director Richard Merchn
Contributing Designers Jaime Ferrand, Arianna Pucherelli
Production Designers Sheila Brennan, Kathy Cygnarowicz
Publishing
PublisherJennifer Hamiltonjennifer.hamilton@oracle.com+1.650.506.3794
Associate Publisher and Audience Development DirectorKarin Kinnearkarin.kinnear@oracle.com+1.650.506.1985
Advertising sales
President, Sprocket MediaKyle Walkenhorstkyle@sprocketmedia.com+1.323.340.8585
Western and Central US, LAD, and Canada, Sprocket MediaTom Cometatom.cometa@oracle.com+1.510.339.2403
Eastern US and EMEA/APAC, Sprocket MediaMark Makinneymark.makinney@sprocketmedia.com+1.805.709.4745
Advertising Sales Assistant, Sprocket MediaCindy Elhajcindy@sprocketmedia.com+1.626.396.9400, x201
Mailing-List Rentals Contact your sales representative.
Editorial Board
Ian Abramson, Karen Cannell, Andrew Clarke, Chris Claterbos, Karthika Devi, Kimberly Floss, Kent Graziano,
Taqi Hasan, Tony Jambu, Tony Jedlinski, Ari Kaplan, Val Kavi, John King, Steve Lemme, Carol McGury,
Sumit Sengupta, Jonathan Vincenzo, Dan Vlamis
Oracle Magazine (ISSN 1065-3171) is published bimonthly with a free subscription price by: Oracle, 500 Oracle Parkway, MS OPL-3A, Redwood City, CA 94065-1600. Periodicals Postage Paid at Redwood City,
CA, and additional mailing offices. POSTMASTER: Send address changes to: Oracle Magazine, P.O. Box 1263, Skokie, IL 60076-8263.
70:1 Compression
oracle.com/partners/goto/exastack
Copyright 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.
From The Editor 5
The Cloud OS
In cloud computing, the OS is more important than ever.
September 28October 2
oracle.com/openworld Innovation in Opportunity Nations partnership, Oracle Events
aimed at enhancing the technology startup oracle.com/events
JavaOne
September 28October 2 and innovation ecosystems of fast-growing Locate User Groups
oracle.com/javaone oracle.com/technetwork/community
African economies.
rEGiStEr nOW
Save $500 by July 18th
2,500 Sessions | 475 Exhibitors | 400 Demos
Register at oracle.com/openworld
Copyright 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
8 Resources
Videos Discover the data management issues that CIOs sionals to discuss improving strategy execution,
Better Clouds at Lower Costs are most eager to solve. operational excellence, and financial performance.
fbit.ly/1n8L5hd
Learn how to build efficient clouds with Oracles White Papers E-Books
SPARC servers running Oracle Solaris. Simplify the Migration of Oracle Database Oracle Applications Together with Oracle
and Oracle Applications from IBM AIX to Systems: From the Customers Perspective
Simplify Your Business with Oracle Oracle Solaris fbit.ly/1rFN8go
Business Analytics fbit.ly/1egb5Wb Hear from current Oracle customers about how
fbit.ly/1g90cWz Learn the four steps required to migrate from running Oracle Applications on Oracle systems
Learn how to keep costs down without sacrificing AIX to Oracle Solaris, and explore an example that simplifies IT and delivers speed and efficiency.
performance or data quality for discovery, busi- illustrates the effort, duration, and benefits of
ness intelligence, and planning applications. the migration. Resource Centers
Data Integration for Oracle Applications
Why Move Business Applications from The Top 10 Reasons to Choose MySQL for fbit.ly/1ht6XEy
IBM to Oracle Next-Generation Web Applications Access white papers, customer testimonials, and
fbit.ly/1iljLHD fbit.ly/1lhPL3e more that illustrate how to gain incremental value
Improve performance and efficiency and reduce Gain a better understanding of why MySQL is the by using best-in-class data integration solutions.
costs by moving enterprise applications from IBM best choice for modern web-, mobile-, and cloud-
Power to Oracles SPARC servers. based applications. Oracle University
Complete Oracle Solaris 11 Curriculum
Oracle Real-World Performance Podcasts fbit.ly/1i1Rdr3
Video Series Oracle Cloud, Featuring Demand Analysis Quickly obtain the skills needed to manage
fbit.ly/QtTS2b fbit.ly/1qj5Eta mission-critical cloud deployments.
Oracles Real-World Performance team Hear Peter Mulligan, Demand Analysis cofounder
shares best practices and performance and vice president of sales and marketing, New Oracle WebLogic Server 12c Curriculum
methodologies to help you make the most of discuss why his company chose Oracle Cloud for fbit.ly/1hMlzKG
your Oracle Database investment. its customer intelligence solution. Explore training and certification for Oracle
WebLogic Server 12c.
Webcasts Making the Right Storage Choices:
Ricoh Americas Delivers on Anytime, Part 1High Availability
web locator
Anywhere Promise with Cloud and fbit.ly/1hC2cTv
On-Premises Integration Learn the characteristics of highly available
Oracle Consulting
fbit.ly/1r5GxbS systems and their impact on the efficiency and oracle.com/consulting
Discover the rewards of using Oracle performance of your storage architecture. Oracle Events and Webcasts
AppAdvantage for SOA-based cloud, on- oracle.com/events
premises, and mobile integration initiatives. Social Media Oracle Newsletters
Oracle President Mark Hurd on LinkedIn oracle.com/newsletters
Spend Testing Time More Effectively Influencer Blog Oracle Podcast Center
oracle.com/podcasts
fbit.ly/OKNXVk flinkd.in/1ernjIb
Oracle University
Explore the latest trends in software testing that Read Oracle President Mark Hurds posts about bit.ly/ouoramag
allow you to deploy higher-quality applications in enterprise IT mandates, executive leadership, Oracle Support
less time. customer imperatives, and innovation. oracle.com/support
My Oracle Support
Top Data Warehouse Trends and Oracles Instantis Page on LinkedIn myoraclesupport.com
Opportunities for 2014 flinkd.in/1sB0wCT My Oracle Support Communities
communities.oracle.com
fbit.ly/1dy5Gvq Join other project portfolio management profes-
ace!
for any IT sp
Adaptable: Our solutions can be adapted to ft any IT confguration
at any time from small IT to data centers! Vendor-neutral
enclosures, for example, come in different depths, heights, and widths
so you can deploy your IT in whatever space you have available
from small IT or non-dedicated spaces to even large data centers.
ur
d manage yo
Monitor an ere!
rom anywh
IT spaces f
2014 Schneider Electric. All Rights Reserved. Schneider Electric, APC, InfraStruxure, and Business-wise, Future-driven are trademarks owned by Schneider Electric Industries SAS
or its affiliated companies. All other trademarks are the property of their respective owners. www.schneider-electric.com 998-1155587_GMA-US_Note3
10 Product Resources
TUTORIALS AND VIDEOS Oracle Extends Cloud with Database and Storage Cloud Services
Java SE 8 Technical Videos Oracle has announced two new Oracle Cloud To remain competitive in todays highly
Dive into the new features of Java SE 8 services, Oracle Database Backup Cloud connected business environment, organiza-
with this series of technical videos covering
Service and Oracle Storage Cloud Service. tions are increasingly adopting and building
the Internet of Things, Java ME, Oracle
Oracle Database Backup Cloud Service new cloud-based solutions. There is also a
Java Embedded, and Java SE.
provides a scalable, low-cost Oracle huge push to migrate existing on-premises
bit.ly/1kexe6Z
Database cloud backup solution and is workloads to the public cloud and support
How Oracle ZFS Storage Appliance tightly integrated with Oracle Recovery portability between on-premises and cloud
Lowers Backup Risk and Cost Manager (Oracle RMAN), allowing cus- environments, says Chris Pinkham, senior
Oracle Vice President Steve Zivanic
tomers to use familiar Oracle RMAN vice president of cloud product develop-
explains how Oracle ZFS Storage
commands for performing backup and ment at Oracle. To help customers achieve
Appliances including the new Oracle ZFS
Storage Appliance ZS3-BA help reduce recovery operations between on-premises these goals, Oracle has further expanded
backup and recovery risks and cost. databases and Oracle Cloud. Oracle Storage its comprehensive set of enterprise-grade
bit.ly/1gtwTRj Cloud Service enables organizations to infrastructure cloud services. The new
securely store, access, and manage data in services are based on open standards,
How to Upgrade Oracles SPARC
the cloud. Oracle Storage Cloud Service is integrated to work together seamlessly, and
T5-4 Server Processor
API-compatible with OpenStack Swift and designed to support full portability between
Watch this step-by-step animation to
learn how to upgrade a SPARC T5-4 provides access to data through REST and on-premises and cloud environments.
server from a one-processor to a four- Java APIs. oracle.com/cloud
processor configuration.
bit.ly/1mRX9X6
Oracle Virtual Compute Appliance X4-2: Turnkey Solution for Cloud
How to Upgrade Oracles SPARC
Oracle Virtual Compute Appliance X4-2, ranging from infrastructure as a service to
T5-8 Server Processor
Follow the steps for upgrading a SPARC the newest release of Oracle Virtual database as a service with features such
T5-8 server from a four-processor to an Compute Appliance, is a wire-once engi- as automated provisioning, elasticity, and
eight-processor configuration in this ani- neered system that comes fully assembled cloud governance.
mation, which covers preparing the new and ready to run pro- The Oracle Virtual Compute Appliance
processor modules, removing the processor duction workloads with exemplifies Oracles unique ability to
filler modules, installing the new processor minimal software- engineer hardware and software together,
modules, and more. defined configuration. providing a superior solution thats easy
bit.ly/1j9JoQF Oracle Virtual to deploy and use without requiring
Compute Appliance major infrastructure changes, says Wim
DOWNLOADS is a turnkey solution Coekaerts, senior vice president of Linux and
Oracle NoSQL Database 3.0 for flexible private virtualization at Oracle. This engineered
Release 3.0 of Oracle NoSQL Database cloud platforms that system can significantly cut provisioning
offers developers an enhanced NoSQL can be used with time and offers investment protection by
solution for building high-performance,
Oracle Enterprise allowing customers to mix server genera-
next-generation applications providing
Manager 12c to tions in the same rack.
increased security, simplified data mod-
eling, secondary indexes, and multi-data- deploy cloud services bit.ly/S2KlR2
center performance enhancement.
bit.ly/1kmj8lv
Oracle Configure, Price, and Quote Cloud Advances On-the-Go Sales
Oracle Database Migration
With the latest release of Oracle Configure, agement, enabling administrators to create
Assistant for Unicode 2.0
Price, and Quote Cloud (Oracle CPQ Cloud), complex pricing and discounting calcula-
Oracle Database Migration Assistant for
Unicode 2.0, released in March 2014, sup- sales professionals and partners can now tions in a drag-and-drop interface without
ports the migration of Oracle Database 12c access the entire Oracle CPQ suite via scripting or advanced rules.
pluggable databases to Unicode. Other mobile tablets from anywhere, anytime, and Oracle CPQ Cloud helps improve cus-
new features include enhanced bulk stay productive while on the go. tomer satisfaction and sales efficiency,
cleansing features with pattern-based Oracle CPQ Cloud streamlines the sales says Ken Volpe, senior vice president of
replacement to resolve certain classes of process from inquiry to order by enabling Oracle product development. Its integra-
data convertibility issues and improved sales staff and partners to generate sales tion into Oracle CX Cloud enables sales
conversion error-handling mechanisms. quotes, orders, and proposals quickly and teams to sell more and sell faster, from lead
bit.ly/1kez1ZT accuratelyfrom anywhere, on any device. to order and service through renewal.
New enhancements include formula man- bit.ly/1iuQiLo
Oracle Identity Management 11g Release 2 Adds Advanced Security MySQL 5.7 Available Now
Features for Cloud and Mobile Devices A new development milestone release
The recently updated Oracle Identity a mobile application to simplify strong for MySQL 5.7, available now, extends the
Management 11g Release 2 includes authentication, replacing corporate- performance, scalability, and reliability of
enhancements that enable organizations issued hardware tokens at a fraction of MySQL and adds enhanced management
to extend consistent access policies and the cost. capabilities. Available for download in the
controls beyond enterprise applications Expanded support for OAuth. Supports MySQL Developer Zone, the milestone
and systems to cloud-based systems and two- and three-legged OAuth as well as release delivers improvements in replication,
mobile devices. more-complex use cases of obtaining security, and instrumentation, resulting
Key new features and functionality in the consent from a user before a third-party in significantly higher performance and
latest release include consumer application can access informa- improved manageability over MySQL 5.6.
Oracle Mobile Security Suite. Secures cor- tion on a service providers application site. The latest MySQL 5.7 development
porate applications and data on personal With the latest release of Oracle milestone release delivers enhanced per-
devices and delivers a consistent user Identity Management 11g Release 2, Oracle formance and management features to the
experience across channels by extending is providing organizations with the most MySQL community, says Tomas Ulin, vice
identity services such as fraud detec- advanced and comprehensive identity president of MySQL engineering at Oracle.
tion, user registration, and self-service management platform, says Amit Jasuja, By encouraging ongoing community par-
password management to customer and senior vice president of identity manage- ticipation and following the release early,
employee digital interactions. ment and security at Oracle. As a result, release often model, we help shorten the
Cloud access portal. Extends the range of organizations can realize the full poten- feedback-to-delivery cycle and allow users
enterprise single sign-on beyond Microsoft tial of cloud and to get faster access to improved product
Windows desktops and enables users to mobile applications capabilities and quality.
have single-sign-on access to software-as- while helping to bit.ly/1mRYb5z
a-service applications from a simple and ensure that valu-
personalized launch pad, available on any able company data
device, tablet, or workstation. remains secure.
NetBeans IDE 8.0 Delivers
Oracle Mobile Authenticator. Provides bit.ly/1pHvJVT Comprehensive Java 8 Support
NetBeans IDE 8.0, available now, allows
developers to make efficient use of the
Oracle Marketing Cloud Adds Manufacturing Cloud Service latest features in Java Platform, Standard
The latest addition to Oracle Marketing workflows that help marketers quickly and Edition 8 (Java SE 8) by quickly identifying
Cloud, Oracle Eloqua for Manufacturing efficiently create and extend channel rela- and converting code to new Java language
Cloud Service is a flexible and scalable tionships. Campaign tasks are automated constructs, such as Lambda expressions and
cloud-based solution designed to help and personalized across print, e-mail, web, Java SE 8 Compact Profiles. The new release
manufacturing organizations deliver per- and telemarketing channels. also further extends HTML5 support by
sonalized experiences to customers and Manufacturing organizations want to adding new features for common JavaScript
prospects while improving marketing out- improve engagement with customers and frameworks and introduces new tools for
comes and efficiency. prospects across digital channels so that popular Java Platform, Enterprise Edition
The new solution introduces industry- they can gain better visibility into their sales frameworks such as PrimeFaces.
specific capabilities that enhance targeting pipeline and grow their businesses, says Additional enhancements include Oracle
and segmentation, increase engagement, Steve Miranda, executive vice president for Java SE Embedded 8 support for deploying,
improve measurement, and produce Oracle Applications development. With running, debugging, and profiling Java SE
actionable reporting. With a full view of capabilities developed specifically for man- applications on an embedded device directly
the buyers journey, insights into customer ufacturers including prebuilt templates and from the NetBeans IDE and support for the
demand signals, and integrated business leading business intelligence, Oracle Eloqua new Java Micro Edition 8 (Java ME 8) specifi-
intelligence reporting, marketers in global for Manufacturing Cloud Service helps man- cation and Oracle Java ME Embedded 8.
manufacturing organizations are able to ufacturers improve marketing effectiveness Java SE 8 represents a major advance-
drive demand and improve the quality of and drive revenue. ment for the Java community, says Chris
leads that are passed to sales. bit.ly/1h7ygPZ Tonas, vice president of mobility and devel-
Oracle Eloqua for Manufacturing Cloud For more about Oracle Marketing Cloud, opment tools at Oracle. NetBeans IDE
Service includes product registration capa- the modern marketing solution that inte- 8.0 ensures that Java developers have the
bilities that help deliver efficient product grates cross-channel, content, and social advanced tooling to support their adoption
I-HUA CHEN
maintenance and subscription renewals, marketing with data management for the of this new technology.
and it provides intuitive templates and enterprise, visit bit.ly/1vcuRZQ. netbeans.org
Oracle Fusion Innovation Management Joins Oracle SCM Portfolio OpenStack Support for Oracle
Oracle Fusion Innovation Management, integrates with Oracles Agile Product Linux and Oracle VM
a new product value chain solution in the Lifecycle Management, helping to stream- Oracle has introduced a technology preview
Oracle Supply Chain Management port- line the process of moving concepts along to of an OpenStack distribution that allows
folio of applications, provides companies detailed design, development, and release Oracle Linux and Oracle VM users to work
with a systematic approach for capturing, to manufacturing while maintaining full vis- with the open source cloud software, pro-
selecting, and investing in the right ibility into project status. viding customers with additional choices
product ideas and managing their product By providing a highly usable but system- and interoperability while taking advantage
portfolios. The new solution enables atic approach to managing product innova- of the efficiency, performance, scalability,
bottom-up innovation so all stakeholders tion, Oracle Fusion Innovation Management and security of Oracle Linux and Oracle VM.
can participate in the product invention can accelerate the transformation of the The distribution is delivered as part of the
and definition processes, with simulta- best ideas into profitable products and Oracle Linux and Oracle VM Premier Support
neous top-down financial impact analysis deliver against your corporate product offerings, at no additional cost.
and strategic-fit visibility to the key port- innovation strategy, Oracle is working closely with the
folio owners during and post investment says Jon Chorley, OpenStack community across many areas,
decision. It also enables organizations group vice president says Wim Coekaerts, senior vice president
to define and manage different product of Oracles supply of Linux and virtualization at Oracle. Oracle
development projects in the context of chain management will continue to help deliver OpenStack
their overall product portfolio. product strategy. capabilities to enable our customers to more
Oracle Fusion Innovation Management bit.ly/1mRXV6E efficiently deploy, manage, and support
their large Oracle data center deployments.
bit.ly/1iZVDPK
New Release of Oracle Business Intelligence Applications Improves
Procure-to-Pay Processes and Talent Management
Oracle has announced Release 11.1.1.8.1 of BI applications to meet specific analytics
Fujitsu and Oracle Enhance
Oracle Business Intelligence Applications, needs for line-of-business managers Fujitsu M10 Servers
which includes prebuilt connectors and executives. Fujitsu and Oracle have announced world-
between Oracle Procurement and Spend Oracle Business Intelligence wide availability of enhanced Fujitsu M10-1,
Analytics and Oracles JD Edwards Applications provide a critical platform for M10-4, and M10-4S servers equipped with
EnterpriseOne and adds a new talent unlocking and analyzing enterprise-level and the new SPARC64 X+ processor, which has 16
profile analytics module. business-level insights, says Paul Rodwick, cores and runs at speeds up to 3.7 GHz.
Built on Oracle Business Intelligence vice president of product management at The new Fujitsu M10-4S server sup-
Foundation Suite, Oracle Business Oracle, with the latest updates reducing the ports mixed SPARC64 X and X+ chassis in a
Intelligence Applications enable organi- time and complexity to achieve a competi- single system, and the modular design and
zations to easily extend their business tive advantage through data. physical partition dynamic reconfiguration
intelligence (BI) footprint or build custom bit.ly/1qnCZa1 feature allow the Fujitsu M10-4S to grow by
adding processors, memory, and I/O with
virtually no downtime.
Oracle Sales Cloud Provides Anywhere, Anytime Access
By giving sales reps a continuous and sim- tating integration from on-premises sales
plified experience on both desktop and force automation systems such as Oracles
mobile devices, even when in a discon- Siebel Customer Relationship Management
nected mode, the latest release of Oracle and Oracle E-Business Suite applications.
Sales Cloud offers anywhere, anytime access The enhancements to Oracle Sales
designed to achieve fast and wide user Cloud reinforce Oracles commitment to The enhanced Fujitsu M10 servers
adoption. The latest release helps sales reps deliver simple and smart sales automation offer a new option for customers seeking
focus on the deals with the highest likeli- solutions, says Siva Sundaresan, group mission-critical computing solutions, says
hood of closing and increases the predict- vice president for Oracle Sales Cloud. With Oracle Chief Corporate Architect Edward
ability of achieving sales targets by deliv- the latest release, Oracle Sales Cloud offers Screven. Oracle and Fujitsus strong col-
ering real-time predictive analytics on both sales teams a simple design, more intelli- laboration furthers Oracles commitment to
desktop and mobile devices. gence, and greater mobility to help optimize help customers accelerate their businesses
Oracle Sales Cloud also helps customers customer interactions, increase sales effec- by engineering hardware and software to
I-HUA CHEN
preserve their existing IT investments and tiveness and efficiency, and drive revenue. achieve extreme performance.
establish an easy path to the cloud by facili- bit.ly/1hIJkHd bit.ly/1j9KLP4
within Hadoop. for what I call web scale personalization Time Decisions software used to process
It complements relational databases by and transactional applications. We often and manage real-time events as well as
Oracle PL/SQL Performance Tuning Partners Earn Oracle PartnerNetwork Specialized Status
Tips & Techniques
By Michael Rosenblum and Two Oracle partners have earned Oracle mentation services; enterprise IT services;
Paul Dorsey PartnerNetwork Specialized status for their and expertise in banking, financial services,
Oracle Press solutions. To achieve Oracle PartnerNetwork and supply chain technology.
oraclepressbooks.com Specialized status, Oracle partners are Black & Veatch, an Oracle Gold
required to meet a stringent set of require- Partner, achieved Oracle PartnerNetwork
Oracle PL/SQL
Performance Tuning Tips
ments that are based on the needs and prior- Specialized status for Oracle Utilities
& Techniques is a hands- ities of the customer and partner community. Customer Care and Billing. Black & Veatch
on intermediate guide for developers and Aurionpro, an Oracle Platinum Partner, provides technology solutions for natural
programmers wanting to achieve results
achieved Oracle PartnerNetwork Specialized gas, electric, and water utilities.
by deploying the latest and best methods
for improving overall speed, reliability, status for Oracle Access Management Suite aurionpro.com
and security. Readers will learn expert Plus 11g. Aurionpro delivers Oracle imple- bv.com
performance-tuning methods that draw
on decades of professional experience.
A number of real-world examples are Seven Partners Earn Oracle Exadata Optimized Status
included in the book.
Seven Oracle partners have achieved Oracle location intelligence.
Predictive Analytics Using Oracle Exadata Optimized status for their solu- Mformation
Data Miner: Develop and Use tions. Oracle Exadata Optimized status Software
Data Mining Models in ODM, SQL,
and PL/SQL is part of the Oracle Exastack Optimized Technologies, an
By Brendan Tierney program, through which Oracle partners Oracle Gold Partner,
Oracle Press can develop, test, and tune their applica- achieved the status
oraclepressbooks.com tions on Oracle Exadata Database Machine, for Mformation
Oracle Exalogic Elastic Cloud, Oracle Service Manager.
This essential how-to
Exalytics In-Memory Machine, and Oracle Mformation is a
guide is written for data
scientists, data miners, SuperCluster engineered systems. global provider of
data analysts, Oracle Flex Software Systems Closed Joint Stock solutions for man-
developers, and database administrators. Company, an Oracle Platinum Partner, aging wirelessly con-
Predictive Analytics Using Oracle Data Miner
achieved Oracle Exadata Optimized for its nected devices.
shows how to build and apply advanced
data mining models and perform data Core System FXL 2 and Va-Bank FXL 2 auto- Model N, an
mining tasks in SQL and PL/SQL. The book mated banking systems. Oracle Gold Partner,
includes guidance on how to migrate data LG CNS, an Oracle Platinum Partner, announced that its
mining models from a test environment to
achieved the status for its Smart ENA 1.0 Model N Revenue Management 5.5.1 and
a production environment.
solution. Smart ENA 1.0 is a pattern analysis 5.6.2 earned Oracle Exadata Optimized
Oracle ADF Enterprise Application solution that provides early fraud detection. status. Model N revenue management solu-
DevelopmentMade Simple, Calypso Technology, an Oracle Gold tions are designed to enable companies to
Second Edition
Partner and integrated capital markets align pricing, contract development and
By Sten E. Vesterli
platform provider, announced that Calypso administration, and payment of trade incen-
Packt
packtpub.com version 14 has achieved Oracle Exadata tives and government reimbursements.
Optimized status. SmartSoft, a Cardtek Group company
Updated for the latest JDS Uniphase, an and an Oracle Gold Partner, announced
release, Oracle ADF Oracle Gold Partner, that its OCEAN international payment
Enterprise Application
achieved Oracle processing system earned Oracle Exadata
DevelopmentMade
Simple, Second Edition explains how to Exadata Optimized Optimized status. OCEAN is a solution for
optimize Oracle Application Development status for its credit card, debit card, point-of-sale/
Framework 12c (Oracle ADF 12c) tech- ariesoGEO. merchant management, and ATM manage-
nology. Readers will walk through a devel-
opment project from proof of concept
ariesoGEO is an ment for banks, financial institutions, pro-
through development and deployment. The enterprise geoloca- cessors, and retailers.
book demonstrates support tools for source tion solution that flexsoft.com
control and issue tracking and explains
collects, analyzes, lgcns.com
application security. It also dives into spe-
cialty topics such as skinning, customiza- and geolocates calypso.com
tion, and internationalization. details from every jdsu.com
customer call or mformation.com
Look for other Oracle books at
bit.ly/oraclebookstore data connection modeln.com
to create a store of smartsoftww.com
Predictive Analytics
Using Oracle Data Miner
Brendan Tierney
Develop and deploy next-generation
predictive analytics applications
Master Competitive
Analytics with Oracle Endeca
Information Discovery
Helen Sun, William Smith
Automatically organize information for
search, discovery, and analysis
Download Oracle
Solaris Studio
OPPORTUNITIES AND
CHALLENGES IN BIG DATA Get Published
Every year millions of people
12.4
Oracle Solaris Studio is a
service-enabled applications.
Building Bridges
Organizational silos thwarting IT architecture goals?
Put away the sledgehammer.
Close Encounters
Three peers extol the virtues of in-person classes and conferences.
Company: Agilex Technologies, a technology Company: Self-employed Company: Gurus Solutions, a software solution
solution provider serving the national security, Job title/description: Independent Oracle provider
healthcare, and public sectors consultant, responsible for database upgrade Job title/description: Senior Oracle DBA,
Job title/description: Vice president of data and migration, database and application tuning, responsible for database performance, integrity,
architecture and engineering, responsible for incident resolution, and design and configuration security, and backup and recovery
reviewing and supporting Agilex projects at of high-availability solutions Location: Amman, Jordan
customer locations Location: Lima, Peru Oracle credentials: Oracle Certified
Location: Chantilly, Virginia Oracle credentials: Oracle Certified Professional (Oracle Forms Developer, Oracle
Oracle credentials: Oracle Exadata Certified Professional DBA (on several releases including Advanced PL/SQL Developer, Oracle Solaris
Implementation Specialist, with 24 years of Oracle Database 10g and Oracle Database 11g), 10 System Administrator, Oracle Database
experience using Oracle products with 19 years of experience using Oracle products 10g, Oracle Database 11g) and Oracle Linux
Implementation Specialist, with more than 7
years of experience using Oracle products
Whats your favorite technique on the
job? Its deconstructing data processing What role has Oracle University [OU] played
routines, whether in PL/SQL or SQL, in your career? In 1996 one of my first Whats your favorite Oracle technology or
and refactoring them into simpler, more employers sent me from Peru to Orlando, solution area? Oracle Fusion Middleware
efficient workflows. Florida, to take an Oracle7 performance because it includes Oracle technologies that
Which new features in Oracle Database are tuning workshop, and I learned a lot. After can help any company build end-to-end
you currently finding most valuable? I always that I took the complete set of courses for solutions. I like that it is a fully integrated
like to see whats being added to SQL, and Oracle8 to gain my first Oracle Certified family of products that can be delivered into
how it can be used to solve harder and harder Professional credential. Ten years later I different layers, with each layer offering a dif-
problems. Analytic functions and recursive became an OU instructor, which allowed me ferent experience. Whether youre focused on
SQL are particularly valuable. And obviously to share my knowledge and experience with integration, automating processes, security,
the new container database architecture in a new generation of DBAs. or compliance, Oracle Fusion Middleware has
Oracle Database 12c will be very usefulboth What advice do you have about getting into something for everyone.
from a security and self-service perspective. database development? Its a fact of life Whats your go-to Oracle reference book? I
Whats been your favorite Oracle technology that things wont always work as expected have lots of Oracle books and most of them
conference experience? I could name any or documented, so take notes on what you are great. Id have to say Expert Oracle RAC 12c
ODTUG eventtheyre all great. I think its do to solve any problems you encounter and by Syed Jaffar Hussain, Tariq Farooq, Riyaj
important for DBAs and developers to talk publish those notes on your blog. This will Shamsudeen, and Kai Yu, and Expert Oracle
to each other, and ODTUG really tries to help you to remember those solutions, and Enterprise Manager 12c by Kellyn PotVin and
facilitate that. I also enjoy networking with it will help others who are experiencing the several coauthors [both Apress, 2013].
colleagues through a local Meetup group same or similar problems. Whats been your favorite Oracle technology
that I chair called Agile Data Experts DC. Its What green practices do you use in your DBA conference experience? It was this past
a monthly gathering of Washington DC data work? I try to work remotely when possible. December at Tech13, the UKOUG [UK Oracle
management professionals where we talk I also recommend server consolidation, User Group] conference. I finally got to meet
about tips, tools, and techniques for agile replacing older energy-hungry servers with many of my online friends and colleagues in
data management. fewer less-energy-demanding ones. person, and we had an amazing time.
Delivering
at the Speed
of Business
Today, companies need to manage huge amounts of data to develop
insights and actionable, valuable informationand to enable business
decision makers to operate with solid information and better foresight.
At the same time, they need to process this growing volume of data
faster than ever in order to stay ahead of the competition and a
constantly changing business environment. In an increasingly real-time
business world, the speed and quality of information are both key.
These trends are putting a strain on traditional IT biggest technology advancement for SPARC servers in
infrastructures, as companies look for better ways to more than a decade.
provide enterprise applications and analytics to the The Fujitsu M10 servers are built on the advanced
business and pursue initiatives such as big data and SPARC64 X processor and now the new SPARC64 X+
data center consolidation. It is becoming clear that processor. These processors include Software-on-Chip
incremental modifcations are not enough to keep up. technology created through the close collaboration
IT groups need innovative approaches that will enable of Fujitsu and Oracle. Software-on-Chip moves some
them to reshape the infrastructure to provide the routines from software programs to the circuitry of
performance and scalability needed to keep up with the chip, increasing the speed of those routines. The
the ever-evolving demands of the business. current Fujitsu M10 hardware and Oracle Solaris 11
software work together with this feature, and with
A Leap Forward in Servers Oracle Database 12c plus patch, companies may
The Fujitsu M10 server line is designed to be at the see an increase in performance of up to 25%, due to
heart of that type of infrastructure. Drawing on Fujitsus Software-on-Chip.
heritage of supercomputingand its deep partnership The Fujitsu M10 also uses an in-memory pro-
with Oracle that is focused on SPARC and mission- cessing concept, which means that data is accessed
critical business computingthis server line offers the within memory in just nano-seconds, rather than the
milliseconds needed for traditional
access to storage and disks. Here
again, hardware and software can
work closely together for a signif-
cant increase in performance.
The Fujitsu M10 includes other
innovative technologies that help
drive high performance. For exam-
ple, Fujitsus advanced High Speed
Interconnect transmission technology
is used to connect CPUs, resulting in
a very fast 14.5 Gbps transmission
rate. In addition, a unique Liquid
Loop Cooling mechanism can cool hot
spots effectively, allowing compo-
nents such as the CPU and memory
to be located more closely to one
another. This close placement and
resulting compute density has helped
the Fujitsu M10 achieve one-ffth
lower memory latency, compared to
previous servers.
activation feature. The SPARC64 X and the SPARC64 X+ CPU equipment that is using power but not contributing to
have 16 cores. When a company purchases a lower-end the bottom line.
Fujitsu M10-1 with one CPU, all 16 physical CPU cores are In addition to high performance and fexibility, the
already included in the box. They can be activated and Fujitsu M10 server design builds on Fujitsus history of
paid for on an as-needed basis, making it easy to quickly providing mainframe-class reliability, availability and
scale from 2 to 16 cores in increments of two, without serviceability technology. Its architecture includes many
having to add any hardware. This core activation concept features that help ensure that business operations are not
applies across the Fujitsu M10 product line, up to the interrupted and unscheduled downtime is not required to
largest 64-CPU modular models. In short, core activation deal with failing hardware or software components. For
may allow companies to license only what they need at example, redundant interconnect paths help minimize
the core level, and keep computing power in step with the risk of errors and data corruption. Predictive self-
changing demandsan approach that is highly cost- healing capabilities enable the operating system to work
effective. with the server hardware to predict component failures
Working hand-in-hand with core activation, the and minimize the impact of issues before they affect the
Fujitsu M10 provides systems operation.
The Fujitsu M10 building block capabilities Fujitsu will keep delivering more with its Fujitsu M10
that enable simple, server line. This means continuing to expand Software-
allows companies modular scalability. For on-Chip capabilities and providing features that further
to keep computing example, if a company increase reliability, availability and serviceability. It also
reaches the capacity means working with Oracle on innovative approaches
power in step with limits with all 64 CPU to big data and other enterprise computing needs
changing demands. cores of a Fujitsu M10-4S and giving customers the technologies they need to be
activated, it can quickly agile and responsive to successfully pursue todays fast-
add a second 2- or 4-socket box to the frst without moving business opportunities.
interrupting the system, and then grow that new box
through the core activation process, as needed. This For More Information
can be continued up to a maximum confguration of To fnd out more about the Fujitsu M10 server, please
16 boxes with 1,024 active cores and 32 terabytes of see these related documents:
memory. Accelerate and Consolidate the Data Center
With these features, the Fujitsu M10 servers provide Consolidate with Fujitsu M10 Servers
tremendous fexibility and expandability. This enables Accelerate Database Performance with
the IT organization to not only optimize its investment Fujitsu M10 Servers
when it frst implements the system, but to keep
Please visit our web site to view the full DNP case study.
optimizing it over time. It essentially provides a pay
as you go modeland helps avoid the all-too-common Additional information about the Fujitsu M10 server line
problem of having to overbuy and ending up with can be found at www.fujitsu.com/sparc.
SPEC (The Standard Performance Evaluation Corporation), SPECint and SPECjbb are registered trademarks of Standard Performance Evaluation Corpora-
tion(SPEC) in the US and other countries.Details and the latest information of this benchmark can be found at www.spec.org. Published as SPARC M10.
Fujitsu M10 is sold as SPARC M10 by Fujitsu in Japan. Fujitsu M10 and SPARC M10 are identical products.
World-record SPECint_rate2006 result: Comparison based upon SPECint_rate2006 result except Supercomputers: 23,800 on a SPARC M10-4S server with 64
SPARC64 X (3.0 GHz) processors, Oracle Solaris 11.1, Oracle Solaris Studio 12.3, 1/13 Platform Specifc Enhancement. Details and the latest information on this
benchmark can be found at www.spec.org.
World-record STREAM result: Comparison based upon STREAM Triad result except Supercomputers: 4,002 GB/s on a SPARC M10-4S server with 64 SPARC64 X
(3.0 GHz) processors. Details and the latest information on this benchmark can be found at www.cs.virginia.edu/stream/.
World-record SPECjbb2013 results: 16 CPU confguration: 308,936 max-jOPS and 168,127 critical-jOPS on a SPARC M10-4S server with 16 SPARC64 X (3.0 GHz)
processors, Oracle Solaris 11.1 SRU 6.4, Java HotSpot 64-Bit Server VM, version 1.7.0_17. 4 CPU confguration: 83,909 max-jOPS and 50,562 critical-jOPS on
a SPARC M10-4S server with 4 SPARC64 X (3.0 GHz) processors, Oracle Solaris 11.1 SRU 6.4, Java HotSpot 64-Bit Server VM, version 1.7.0_17. Details and the
latest information on this benchmark can be found at www.spec.org.
Power for
Global Expansion
D
ai Nippon Printing Co., Ltd. (DNP) is one of the stable service for information
worlds largest printing companies, but its business systems, from planning
extends over a wide variety of felds, including and design to construction,
Information Communication (e.g. publication printings operation, and maintenance.
and digital signage), Lifestyle and Industrial Supplies When we investigated
(e.g. packaging and lifestyle materials) and Electronics Fujitsu M10, the key points
(e.g. display components and electronic devices). DNP considered were not just its
has been actively expanding globally and now has 26 high performance, but its operational stability inherited
sales locations and 13 manufacturing plants around the from mainframe reliability, the fact that it embraces the
world. The processing for DNP exports is done primarily future potential and long-term support of Oracle Solaris,
through its central overseas business system. The previous and its compatibility with Oracle Database. Specifcally
system had been constructed based on HP-UX, but it had when combined with Oracle Database 11g, Fujitsu
M10-1 is able to deliver one-stop-
shop support for our business and
signifcantly reduce maintenance
costs.
For the new system confguration,
Fujitsu M10-1 was used as the core
database server. Fujitsu M10 and
Fujitsu made sure system construction
could be completed in a short amount
of time, says Mr. Shohei Yamashita,
Third Work System Dept., Work System
Tomoyasu Nagata Kazuo Kurosawa Shohei Yamashita Headquarters, DNP Information
Systems. The database server works in conjunction with
limitations in terms of expandability. For this reason,
the application server and the backup server. Furthermore,
DNP elected to replace the system using Fujitsu M10
Fujitsus one-stop-shop support delivers a quicker
servers.
resolution in the event of any issues.
DNP needed a high performance system that could handle
After installation, the databases response performance
increases in the amount of overseas business job data
doubled. Batch processing performance has tripled, thus
and additional users, and evaluated multiple vendors.
greatly reducing overall processing time. Total opera-
We had been paying close attention to information about
tional costs have been cut by nearly 35%, with software
new, high-performance servers and [Fujitsu M10s] high-
maintenance costs kept down, and operational effciency
performance, based on supercomputer technology, was a
increased by installing a backup server.
step above conventional servers, says Tomoyasu Nagata,
Section Head of the Overseas System Section at DNP. We Regarding future prospects, Mr. Nagata says, Were
confrmed the fgures backing Fujitsu M10 and it quickly planning to add more functionality leveraging CPU Core
became a very suitable candidate. Activation, which will allow us to fexibly expand the
system as needed. With this function, we can scale up
The fnal selection was done by DNP Information Systems
when our business is ready while keeping initial costs
Co., Ltd., which manages information systems for the
down. We look forward to working with Fujitsu as they
DNP Group. Mr. Kazuo Kurosawa, Department Head at
continue to support us through leading-edge solutions
DNP Information Systems, stated, Our role is to provide a
like Fujitsu M10 technology for big data processing.
SUCCESS ON
SPARC
The latest SPARC chips and
systems are at the center of better
business processes.
BY PHILIP J. GILL
Seamless Reliability
No matter how they are deliveredairwaves, cable, or satellite
With the new SPARC systems,
broadcast television services demand 24/7 operations that operate some applications run up to
reliably and seamlessly, at the touch of a button or the flick of a
switch. With a subscriber base of more than 15 million households,
10 times faster.
Mumbai, Indiabased Tata Sky is the leading provider of satellite- N. Ravishanker, Chief Information Officer, Tata Sky
based, direct-to-home broadcast television services in India.
We offer a wide variety of television services, from standard- [business-to-consumer] organization in scalability and reliability.
definition and high-definition channels to video-on-demand, We needed a hardware refresh that added capacity to support
mobile TV, movies, and personal video recordersboth standard our growing subscriber base, says Ravishanker. We also needed to
and high definitionas well as interactive content including games, set up a disaster recovery [DR] site to maintain the 24/7 reliability
educational applications, and more, says N. Ravishanker, chief and availability our customers have come to expect.
information officer at Tata Sky, a joint venture between Indian con- Tata Sky has been using SPARC servers running the Oracle Solaris
glomerate Tata Group and the US-based mass-media firm STAR TV. operating system since the companys inceptionit opened for
In 2012, Ravishanker explains, the firm was looking to add both business in 2006 with SPARC-based Sun Fire E20K serversand it
capacity and capability to better serve its growing customer base. looked to new SPARC servers to upgrade and enhance its IT infra-
There is excellent opportunity for growth in this market, especially structure, beginning in 2012 with new SPARC Enterprise M9000
since there is so much churn in cable television, he says. Since and SPARC T4 servers from Oracle and continuing in 2013 with
this is a commodity product, we face challenges similar to every B2C Oracles next-generation SPARC T5 and SPARC M5 servers.
Namas Bhojani
According to N. Ravishanker, chief information officer at Tata Sky, SPARC systems have improved performance, cut costs, simplified operations, and improved
reliability and availability for Tata Skys core business-critical applications.
Multithreaded
Under their metal exteriors, Oracles next- and therefore greater availability and serviceabil- of those SPARC chips has 12 corestwice the
generation SPARC T5 and SPARC M6 servers look ity, says Ribeiro. As a result, you can consoli- number of cores as its predecessor, the SPARC
alike, sharing common components, terabytes date more applications and deploy more virtual M5and each core can run 8 threads simultane-
of memory and storage, and more. What distin- machines, while achieving better performance ously, allowing for 3,072 threads running in the
guishes one from the other is how they are put through the highly scalable design. top-of-the line systems 384 cores. The SPARC
together, and that, in turn, is a matter of scale. The design differences between SPARC T5 M6-32 offers enough power to run the largest,
The two systems were designed to handle and SPARC M6 servers are obvious in the way the most demanding applications in use today, all in-
the same tasks, but with different design systems can be configured. The SPARC T5 system memory, says Ribeiro.
approaches, says Renato Ribeiro, director of begins with a blade server with a single processor The new SPARC T5 and SPARC M6 also run
product management for SPARC systems at and 256 GB of memory and tops out with a server counter to the conventional wisdom about large-
Oracle. SPARC T5 servers scale up to consider- with 8 processors and 4 TB of memory. scale multiprocessor systemsthey offer near-
able capacity, while using a fraction of a server The SPARC M6, introduced in September 2013, linear pricing from a two-processor SPARC T5-2
rack. The SPARC M6 server supports four times picks up where the SPARC T5 leaves off, and is server to the 32-processor, multiterabyte SPARC
the capacity of the largest SPARC T5 system. Oracles newest, most powerful, and most scal- M6-32 server. Although they scale to a very high
The design and capacity of the SPARC M6 able SPARC server to date. The top-of-the-line number of processors and many terabytes of
server delivers additional benefits. SPARC M6 SPARC M6-32 has up to 32 12-core 3.6 MHz SPARC memory, users dont pay a premium for that per-
servers include more component redundancy processors and up to 32 TB of main memory. Each formance on the bigger package, Ribeiro says.
According to Ravishanker, these systems have improved perfor- T5 and SPARC M6 systems have so much power and capability that
mance, cut costs, simplified operations, and improved reliability businesses today will typically carve these servers up into multiple
and availability for the companys core business-critical applica- virtual machines and deploy multiple different applications on a
tions, including its billing, smartcard management, electronic single system. Users not only get much higher performance, they
voucher distribution, and online customer ordering systems. get better return on their investment.
With the new SPARC systems, some applications run up to
10 times faster, he says. An application that ran at 4 seconds Where Credit Is Due
per transaction now performs at 0.4 seconds per transaction, Performance is important in all industriesand all economies. Turkey
and that provides near-instantaneous response times to our has a rapidly growing private sector whose growth is fueled in large
customers online requests, such as ordering movies or new part by the availability of consumer credit.
television channels. Although credit card penetration is high
The company also has established its in Turkey, the demand for consumer credit
first DR site, located in the city of Pune, snapshots continues to grow, explains Sinan zer,
India. With the new data center, should Tata Sky executive vice president of infrastructure
we experience a full-scale shutdown at our tatasky.com operations and security at Yapi Kredi Bank.
Location: Mumbai, India
primary production site, we can be back up Yapi Kredi was founded in 1944 as Turkeys
Industry: Media and entertainment
and running in less than 90 minutes, says Employees: 1,500 first private bank. It is the nations fourth-
Ravishanker. Powered by our new SPARC Oracle products: SPARC T4-2 and SPARC largest private bank and was the first to
servers, the disaster recovery site provides T4-4 servers; SPARC T5-2 and SPARC introduce consumer credit cards in 1991.
our customers with greater service reli- T5-4 servers; SPARC M5-32 server; SPARC To keep up with demand, Yapi Kredi
Enterprise M9000; Oracle Solaris 11 with
ability and availability. is currently migrating its credit card pro-
Oracle Solaris Zones Preflight System
We slashed operating costs 20 percent, Checker; Oracle Solaris Cluster (for high cessing from legacy mainframes and non-
including licensing, reduced data center floor availability); Oracle Database 11g; Oracle SPARC UNIX servers, consolidating that
space requirements, improved energy effi- Real Application Clusters; Oracle Enterprise workload on larger, more-powerful, and
ciency, and consolidated 61 legacy systems at Manager; Oracle VM 3.0; Siebel Customer cost-effective SPARC T5 series servers from
Relationship Management; Oracle Active
no additional cost, thanks to SPARCs built-in Oracle running the Oracle Solaris 10 oper-
Data Guard; Oracle Advanced Customer
advanced virtualization technologies and Support Services ating system and Oracle VM 3.0.
linear scalability, Ravishanker continues. Were consolidating our legacy servers
We have been able to do all this and main- Yapi Kredi onto new SPARC T5 servers, using virtual-
tain service levels with less staff. yapikredi.com.tr ization to bring 80 hosts down to 50 hosts
Location: Istanbul, Turkey
Such an array of benefits is common running on 10 machines, says zer. When
Industry: Financial services
among companies deploying SPARC T5 and Employees: 14,865 were finished, 65 percent of all our pro-
SPARC M6 servers, says Masood Heydari, Oracle products: SPARC T5-4, SPARC cessing will be done on SPARC servers.
senior vice president of SPARC systems for T4-4, SPARC T4-2, and SPARC T4-1 servers; These SPARC systems will be running
the systems group at Oracle. SPARC Enterprise M9000; Oracle Solaris 10; not just consumer credit card operations
Oracle Database 11g and Oracle Database 10g;
Organizations used to map one applica- but also retail banking, merchant card and
Oracle GoldenGate; Oracle Internet Directory
tion to one server, explains Heydari. SPARC banking, risk management, treasury, and
Performance: Performance:
10,902 27,843
SPEC and the benchmark name SPECjEnterprise are registered trademarks of the Standard Performance Evaluation Corporation.
Virtualized results on spec.org as of 5/21/2013 for application and database on one 8-chip server. SPARC T5-8, 27,843.57 SPECjEnterprise2010 EjOPS, pricing on
oracle.com; IBM Power 780, 10,902.30 SPECjEnterprise2010 EjOPS, pricing on ibm.com. Server cost excludes storage and software. Details: oracle.com/sparc-t5.
Copyright 2013, Oracle and/or its affiliates. All rights reserved.
National Geographic Education supports the
mission of the National Geographic Society to
TOGETHER ORACLE AND inspire people to care about the planet by
NATIONAL GEOGRAPHIC EDUCATION ARE creating compelling educational materials for
young people and the adults who teach them.
Region Extreme:
Multi-Task-Flow Binding
Render an unknown number of task flows in page or
dashboard regions.
default name for the navigation case. 27. In the Properties inspector, change the attribute to Cancel, the Action attribute
14. Create a navigation case from the Browse value of the Binds property to ${page to return, and the Immediate attribute
view to the Edit view, and enter edit as FlowScope.departmentsTaskFlow to true.
the name of the navigation case. Bean.voinstance}. Do not be con- 40. Save your work.
15. Create a navigation case from the Edit cerned that a border now surrounds the 41. Select the Bindings tab at the bottom of
view activity to the Browse view activity, Binds field. the visual editor for the Edit page.
and name it return. 28. Save your work. 42. In the bindings editor, select
16. Save your work. What you just did: You created a read-only allDepartmentsIterator in the
What you just did: The method call activity view to display department data in the Executables section.
you created references a method in the regions. Because the sample application 43. In the Properties inspector, change the
Oracle ADF Business Components applica- uses a single bounded task flow definition value of the Binds property to ${page
tion module that creates new instances to display department information for mul- FlowScope.departmentsTaskFlow
of the DepartmentsView view object. The tiple regions, you used adaptive binding in Bean.voinstance}.
name of the new instance is saved in a pre- the allDepartmentsIterator to dynamically 44. Save your work, and close all open page
built managed bean property. At runtime, determine which ViewObject instance to tabs. The bounded task flow is complete.
the navigation cases you created are used to query data from. What you just did: You created an Oracle
navigate between the department read-only 29. Click the departments-flow.xml tab ADF bound input form in which users can
view and the editable form. to switch back to the task flow edit department information in a region at
17. In the task flow diagram editor, double- diagram editor. runtime. The DepartmentId field in the form
click the Browse view activity to open the 30. Double-click the Edit view activity, and is configured to be read-only, and the Submit
Create ADF Page Fragment dialog box. use the magnifying glass icon next to the button action property references a prebuilt
18. Click the magnifying glass icon next to Directory field to select the departments managed bean method to commit data
the Directory field. folder in public_html/btf. Click Select, changes before returning to the browse page.
19. In the Choose Directory dialog box, click and then click OK. The Cancel button uses immediate=true
the Create new subdirectory icon next 31. Drag the allDepartments collection from so the Oracle ADF model is not updated with
to the Location field and create a new the Applications tabs Data Controls any changed data when the button is clicked.
btf folder under the public_html folder. panel to the page, and drop it on the Edit Like the browse page, the edit page uses
Under the btf folder you just created, page as an ADF Form. adaptive binding to connect to the server-
create a departments folder. Click Select. 32. In the Create Form dialog box, click the side ViewObject instance.
20. Ensure that the Facelets and Create Blank ADF Input Text w/Label value next to
Page options are selected in the Create the DepartmentId value binding entry Creating the Multi-Task-Flow
ADF Page Fragment dialog box, and click and change it to ADF Output Text w/ Binding
OK to create the new page fragment. Label. Then click the Submit checkbox Now create and configure the multi-task-
21. With the Browse page open in the visual and OK. flow binding:
editor, expand the Data Controls panel 33. Click Submit in the visual editor 45. On the Applications tab, double-click
on the Applications tab and click the for the Edit page, and choose the Home.jsf file in the ViewController
allDepartments collection. Window -> Structure. -> Web Content -> utf node to open the
22. Drag the allDepartments collection to the 34. Right-click Submit in the Structure page in the visual editor.
page, and drop it as an Oracle ADF Form. window, and choose Surround With. 46. Click the Bindings tab at the bottom of
23. In the Create Form dialog box, click the 35. In the Surround With dialog box, select the visual editor.
Read-Only Form and Submit checkboxes Panel Group Layout and click OK. 47. In the binding editor, click the green plus
to create a read-only form and a button 36. In the Structure window, right-click (+) icon in the Executables header.
(which youll configure next) for navi- af:panelGroupLayout and select Insert 48. In the Insert Item dialog box, change the
gating to the editable page. Click OK. Inside Panel Group -> Spacer. selection from Generic Bindings to ADF
24. Click Submit in the visual editor, and 37. Repeat step 36, except select Button Task Flow Bindings.
choose Window -> Properties. instead of Spacer. 49. Select the multiTaskFlow item, and
25. In the Properties inspector, change the 38. In the visual editor, click the Submit click OK.
Text property value to Edit and select button and change its Action property 50. In the Insert multiTaskFlow dialog box,
edit as the value of the Action property. to #{backingBeanScope.edit add mtb1 as the value of the id attribute
26. Click the Bindings tab at the bottom of DepartmentBacking.onSubmit} in the and ${viewScope.multiTaskFlowList
the visual editor. In the bindings editor, Properties inspector. Bean.multiTaskFlowBindings} as the
select allDepartmentsIterator in the 39. Click the button 1 button. Using the value of the taskFlowList attribute. (You
Executables section. Properties inspector, change the Text must use these exact values for the con-
Managing Expressly
Manage Oracle Database with Oracle Enterprise Manager
Database Express, a built-in browser-based graphical tool.
already granted these two Oracle Enterprise control files for the database, the size and activities, such as managing users and roles.
Manager Database Express roles, so any number of records in different sections of It displays three submenus:
user with a DBA role will not need to be the control file, and more. Users. Click this item to see the list of users
granted these Oracle Enterprise Manager The next menu itemSecurityenables and details such as status (active, locked,
Database Express roles explicitly. you to perform database-security-related or password expired), default tablespace,
when they were created, and expiration ties of the active sessions. These are all ID shows the breakdown of the wait classes
dates for passwords. (This item also enables active displaysthat is, if you move your for that activity. Place your cursor over the
you to alter users and create new ones.) cursor over a part of the diagram, you will colored bar, and a pop-up box will show the
Roles. Click this item to create, alter, and see the name and the value of the metric name and the value of the metric.
display database roles. it represents and the time it was collected. In the chart in Figure 4, you can clearly
Profiles. Click this item to create, alter, and You can go back as far into the past as data see that the first SQL ID4sjngb1tsayy9is
display database profiles. (Profiles enable is available in the Automatic Workload responsible for most of the activity in the
you to control how long the user session Repository feature of Oracle Database. database. Your next diagnostic step is to
is allowed to remain active, control how It is easier to see the power of these find out why that SQL statement is so active.
many invalid login attempts are permitted charts and graphs by examining them in the Click the 4sjngb1tsayy9 SQL ID to get the
before the account is locked, define the context of a real problem. Suppose you are details on that SQL statement. That brings
function to enforce the complexity of the investigating the cause of a database perfor- up the SQL Details screen shown in Figure 4.
password, and so on.) mance problem. From the time picker, you Click the Execution Statistics tab.
can see that there is a spike at 7:10:00 p.m., The SQL Details screen includes two
Performance as shown in Figure 3. From the main menu, types of output. At the top, in the Plans area,
The last menu item is Performance. (Note choose Performance and then from the tabs you can see the impact of the SQL state-
that you need to license the extra-cost below the time picker, click Activity, which ment represented through various metrics,
Oracle Diagnostics Pack to use this menu shows total activity and the associated including the database time, the number of
item.) I will devote more attention to it here, wait classes. The section at the bottom left I/O requests, the rows returned, the number
because this is an item you will likely spend shows the SQL statements with the highest of times the statement was parsed, and so
a lot of time on. activity. The colored bar next to each SQL on. If the SQL statement has had different
The Performance menu item includes
two submenus. Lets take the first one
Performance Hubwhich displays a screen
similar to the one shown in Figure 2. The
topmost graph, called the time picker, shows
the average active sessions across various
points in time.
You can drag the shadow box across the
graph to focus on the activities in a par-
ticular time period. The information below
the graph will change to reflect the activi-
ties in that period. The various color bands
represent different activitiesblue for user
I/O, green for CPU, and so on. Place your
cursor above a color band. A pop-up text
box displays the metric that this bar rep-
resents and its value. A camera icon on the
graph (at around 07:00 p.m. in Figure 2) Figure 4: SQL Details screen
indicates that an Automatic Database
Diagnostic Monitor task was run at that
time automatically (Automatic Database
Diagnostic Monitor is a feature of Oracle
Database). If you place your cursor above
that icon, you will see the task ID, which
enables you to check the details of that
Automatic Database Diagnostic Monitor
task later. You can check the details on that
task in the ADDM tab on the screen shown
in Figure 2.
The four boxes below the time picker are
self-explanatory: the load average of the
database host, memory, I/O, and the activi- Figure 5: SQL Tuning Advisor
Advisor review for all of your high-impact of the display can quickly reveal whether the mance issues and use SQL Tuning Advisor to
SQL statements. instances are equally loaded or skewed. improve database performance.
With Oracle Enterprise Manager Database Oracle Enterprise Manager Database
Express and SQL Tuning Advisor, you can Express also works on Oracle Multitenant
not only identify the high-impact SQL state- databases. The database home page shows Arup Nanda (arup@
ments; you can also get recommendations the details of the multitenant container proligence.com) has
on improving their performance quickly and database (CDB). However, the Performance been an Oracle DBA
compare the effectiveness of the suggestions panel at the right has a tab labeled PDBs since 1993, handling
with the originalall with just a few clicks. that shows the pluggable databases (PDBs) all aspects of database
running on the CDB, as shown in Figure 8. administration, from
Express Compatibility The Performance bar chart shows the divi- performance tuning to security and disaster
Oracle Enterprise Manager Database Express sion of various PDBs, differentiated by mul- recovery. He was Oracle Magazines DBA of the
also works with Oracle Real Application tiple colors. Year in 2003 and received an Oracle Excellence
Clusters (Oracle RAC) databases. The Award for Technologist of the Year in 2012.
Database home page, similar to the screen Conclusion
Next Steps
shown in Figure 7, shows all the database Oracle Enterprise Manager Database Express
instances and details of each, such as the provides Oracle Database 12c DBAs an out-of-
LEARN more about
host the instance runs on, how long the the-box graphical interface for common data- Oracle Enterprise Manager Database Express
instance has been up, and so on. A very base management tasks. This article explored Oracle Database 2 Day DBA 12c Release 1 (12.1)
bit.ly/1lBKmow
useful display is the graphical representation Oracle Enterprise Manager Database Express
of the CPU, memory, and active sessions on features, described basic tasks, and demon- DOWNLOAD Oracle Database 12c
bit.ly/1czAk2I
each of the instances. A visual examination strated how to troubleshoot common perfor-
Join Us.
Copyright 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
Oracle Database
mentions, and em_incoming. (You can em_memes_pkg.mentions_t This is a nested table type that contains rows of data from the em_mentions table.
create these tables by using the emmemes_ em_memes_pkg.meme_ids_t This is a nested table type that contains primary keys from the em_memes table.
setup.sql script in the download for this em_memes_pkg.log_error This is a generic (and typical) error-logging mechanism. Defined as an autonomous
article, at bit.ly/QntyHo). Note that the transaction, it writes out the basic error information available from the DBMS_
UTILITY functions (and more) to a log table and then commits just that insert.
columns of these tables have been simpli-
em_memes_pkg.unpacked_incoming This is a function that converts a row of incoming data (whose mention details column
fied for the purposes of this article. is an XML document that holds the different formats of source information) into a
The developers at extremememe.info record that can be inserted into the em_mentions table.
use the em_memes table for all the memes em_memes_pkg.reset_meme_status The heart and soul of the extremememe.info proprietary process, this procedure
I-Hua Chen
of which they are aware and whose status analyzes the contents of the mentions table and ascertains the status of the meme.
they track. (Note that setting the default Table 1: em_memes_pkg elements and descriptions
IS (between SQL and PL/SQL) and consequently The presence of this antipattern was also
TYPE incoming_t IS TABLE OF greatly slows the performance of the code. a source of delight for me. The developers
em_incoming%ROWTYPE; Fortunately, this classic antipattern has a needed to improve the performance of the
classic, well-defined solution: use BULK procedure significantly. That would have
TYPE mentions_t IS TABLE OF COLLECT and FORALL to switch from row-by- been very hard to do if they had already
em_mentions%ROWTYPE; row processing to bulk processing. taken full advantage of SQL and PL/SQL
procedure a cursor FOR loop that contained 13 Set a savepoint for this new transaction.
two nonquery data manipulation language 15 Convert the incoming row to a record that can be inserted into the em_mentions table.
(DML) statements. That is a classic anti- 1724 Insert a single row into the em_mentions table.
pattern, a general pattern of coding that
2627 Compute the new status for the meme, based on the new mention.
should be avoided. It should be avoided
2934 If the status isnt NULL, update the em_memes table with that status.
because the inserts and updates are changing
the tables on a row-by-row basis, which 3539 If anything goes wrong, log the error and then erase the effects of the insert and/or the update by rolling back to
the savepoint.
maximizes the number of context switches
performance optimization features. Because power of your brain to hide the obvious from Take the Challenge
they had not done so, they were looking at a you. Once youve spent a lot of time writing
procedure full of low-hanging fruit. That is, or working with a program, you dont really Each PL/SQL article offers a quiz to test your
knowledge of the information provided in it.
they were looking at the possibility of solving see the code anymore. You see what you
The quiz appears below and also at PL/SQL
their problem with a relatively straight think the code should be. When someone Challenge (plsqlchallenge.com), a website that
forward change to their existing code. else looks at it, they come at it without any offers online quizzes on the PL/SQL language
as well as SQL, Oracle Application Express,
preconceived notions and perceive very dif-
database design, and deductive logic.
Code Review Identifies a Logic Flaw ferent aspects of the program. Here is your quiz for this article:
I shared my dismay and delight with the If youre the only one whos ever looked Which of the following statements about
BULK COLLECT and FORALL are correct?
extremememe.info developer team. They at your code, you can be certain it contains
a. System global area (SGA) is the only type
were excited about the potential improve- bugs and perhaps even substantial algo- of memory affected by a switch from row-by-
ments and were eager to get started. Then I rithm errors. row processing to bulk processing.
b. You can use BULK COLLECT only with non-
noticed something odd about the algorithm Members of the extremememe.info
dynamic queries.
theyd presented. A brief Q&A session soon developer team quickly agreed that the c. You can have only one nonquery DML state-
clarified matters: statuses of the memes should be updated ment inside a FORALL statement.
d. If you want to make sure the SQL engine at
Can the table of incoming data contain only after all mentions were inserted.
least attempts to execute every DML state-
more than one reference to the same meme? Furthermore, only those memes with new ment generated by FORALL, add the SAVE
Heads nodded vigorously. They told me mentions should be updated. EXCEPTIONS clause.
that the more viral the behavior of a meme, In the remainder of this article, I
the more mentions there would be. In the show you the end result of the rewrite of In the reset_meme_status procedure, the
case of some very popular memes, the daily extremememe.infos em_memes_pkg transaction consists of two DML processes:
incoming could contain millions of refer- .reset_meme_status procedure into a 1. Insert a row into the mentions table.
ences to the same meme. That led directly program that runs significantly faster and 2. Update the memes table.
to my second question: made it possible for data volumes to grow A quick glance at the original procedure
Then why are you updating the meme substantially while still allowing the batch code in Listing 1 shows that these two pro-
status after each insert of a mention? process to be finished in a single day. My cesses go together: if the insert fails, the
Now eyebrows shot up and heads were stevenfeuersteinonplsql.blogspot.com blog update wont execute. If the update fails,
turned. Wow, said one developer. Oh. My. expands on this article to take you through the insert will be rolled back. And in either
Gosh. said another. those changes in a step-by-step process. case, the error will be logged and pro-
The team lead turned to me. We never cessing will continue.
thought of that before. Weve been doing On Switching to Bulk Processing With the switch to bulk processing,
an enormous amount of unnecessary Although row-by-row processing can be the procedure moves from a row-by-
processing. Thats kind of embarrassing. unacceptably slow for large volumes of data, row approach to a phased approach. For
It sure helps to have a fresh pair of eyes it offers a significant advantage for execu- reset_meme_status, this means that the
looking at our code. tion of nonquery DML: it is easy to define procedure will perform all the inserts first
Yes, it does. Never underestimate the and manage a transaction. and then execute all the updates.
Generally, you can think of bulk pro-
cessing as having three distinct phases:
Phase 1: BULK COLLECT from table(s) to collection
Phase 1: Populate the collections that
Relational will drive the FORALL processing. This is
Table usually done with a BULK COLLECT query.
Phase 2: Modify the contents of the col-
lections as needed to prepare them for
Phase 3.
Phase 2: Modify contents of collection Phase 3: Execute the FORALL statement to
according to requirements
push the data into the table(s).
Figure 1 shows these three phases.
In the real world, life is complicated and
there are always exceptions. Sometimes
Relational you will not need Phase 1, because the col-
Table
lections are already filled and being passed
Phase 3: FORALL from collection to table(s)
to your program, and sometimes you can
Figure 1: Bulk processing phases skip Phase 2, because the collection is
ready to go, to be used immediately in the With all that in mind, lets now imple- IS
FORALL statement. ment the get_next_set_of_incoming BEGIN
procedure (called in the new em_update_ FETCH incoming_cur
The Bulk Processing Implementation status procedure). The get_next_set_ BULK COLLECT INTO incoming_out
The code in Listing 2 is the rewrite of the of_incoming procedure passes back a LIMIT bulk_collect_limit_in;
too slow em_update_status procedure. collection of incoming records; BULK END;
This new version takes advantage of nested COLLECT will improve the performance,
procedures (procedures declared within and the LIMIT parameter will help control First, note that I use the NOCOPY hint in
another procedure or function). The code PGA consumption: my parameter definition. By using NOCOPY,
for these nested proceduresget_next_ Im asking Oracle Database to not make a
set_of_incoming, unpack_and_record_ PROCEDURE get_next_set_of_incoming ( local copy of my collection inside the proce-
mentions, and reset_meme_statusesis incoming_out dure. The result will be lower PGA consump-
presented and analyzed later in this article. OUT NOCOPY em_memes_pkg.incoming_t) tion and improved performance.
Descriptions of the key parts of the revised
em_update _status package appear at the Code Listing 2: Meme status updater, version 2
end of Listing 2.
Now lets take a closer look at each of the
1 CREATE OR REPLACE PROCEDURE em_update_status (
nested procedures, correlating each of these 2 bulk_collect_limit_in IN PLS_INTEGER DEFAULT 100)
with the phases I described earlier. 3 IS
4 bulk_errors EXCEPTION;
Phase 1: Get incoming rows. When youre
5 PRAGMA EXCEPTION_INIT (bulk_errors, -24381);
switching to BULK COLLECT to fetch data, 6
there are a few key guidelines to keep in mind: 7 CURSOR incoming_cur
8 IS
You can use BULK COLLECT with static
9 SELECT * FROM em_incoming;
SELECT statements (SELECT BULK 10
COLLECT INTO and FETCH BULK COLLECT 11 l_incoming em_memes_pkg.incoming_t;
12
INTO) and dynamic queries (EXECUTE
13 l_affected_meme_ids em_memes_pkg.meme_ids_t;
IMMEDIATE BULK COLLECT INTO). 14 := em_memes_pkg.meme_ids_t ();
If your original code contains a cursor 15
16 PROCEDURE get_next_set_of_incoming ....
FOR loop that fetches many rows (thou-
17 PROCEDURE unpack_and_record_mentions ....
sands and higher) but the loop body does 18 PROCEDURE reset_meme_statuses ....
not have any nonquery DML (inserts, 19
20 BEGIN
updates, deletes), you probably do not
21 OPEN incoming_cur;
need to switch to BULK COLLECT. The 22
PL/SQL compiler automatically optimizes 23 LOOP
24 get_next_set_of_incoming (l_incoming);
cursor FOR loops to return 100 rows with
25 EXIT WHEN l_incoming.COUNT = 0;
each fetch. 26
BULK COLLECT and FORALL work with 27 unpack_and_record_mentions (l_incoming, l_affected_meme_ids);
28 END LOOP;
PL/SQL collectionsarraylike structures.
29
These collections consume process global 30 CLOSE incoming_cur;
area (PGA) memory, which is allocated 31
32 reset_meme_statuses (l_affected_meme_ids);
per session. It is possible for sessions to
33 END;
run out of memory and return the ORA-
04030: out of process memory error. Line(s) Description
The best way to manage memory in bulk 2 BULK COLLECT returns multiple rows with each fetch. This parameter controls the number of rows fetched.
processing is to use the LIMIT clause with 45 Because the original procedure traps exceptions, logs the errors, and continues processing, use SAVE
BULK COLLECT. EXCEPTIONS in the FORALL statements and include an exception handler for ORA-24381.
Any collections populated by BULK 1113 Declare nested tables based on the packaged types to be used by the nested procedures.
COLLECT are either empty or filled sequen- 1618 The nested procedures.
tially from index value 1. This means that 2132 The now small and very readable executable section. Heres the narrative version of the code:
every index value between that returned by Open the cursor that identifies all the incoming rows to be processed.
Get the next N rows of incoming data. Stop when the collection is empty.
the FIRST method (lowest defined index Unpack each incoming row, and insert it into the mentions table. Add all IDs of memes that were
value) and the LAST method (highest mentioned into the collection of affected memes.
After inserting all mentions, reset the statuses of only those memes that were affected.
defined index value) is defined.
Next, because I already opened the Code Listing 3: Unpack and record mentions
cursor on line 21 of the new em_update_
status procedure, all I need to do in this 1 PROCEDURE unpack_and_record_mentions (
get_next_set_of_incoming procedure is 2 incoming_in IN em_memes_pkg.incoming_t,
3 affected_meme_ids_out IN OUT em_memes_pkg.meme_ids_t)
fetch. And I want to retrieve multiple rows
4 IS
with each fetch, so I put the keywords BULK 5 l_affected_this_time em_memes_pkg.meme_ids_t;
COLLECT in front of INTO and then provide 6 l_mentions em_memes_pkg.mentions_t := em_memes_pkg.meme_ids_t();
a collection after INTO. 7 l_status em_memes.meme_status%TYPE;
8
I then add the LIMIT clause, which tells 9 PROCEDURE add_to_affected_memes
Oracle Database to retrieve up to that 10 IS
number of rows with each FETCH. I could 11 BEGIN
12 affected_meme_ids_out :=
have provided a literal instead of a param-
13 affected_meme_ids_out
eter, as in 14 MULTISET UNION DISTINCT l_affected_this_time;
15 END;
16
LIMIT 100;
17 PROCEDURE record_errors
18 IS
In fact, 100 is a good default value. You 19 l_bad_index PLS_INTEGER;
get a nice boost in performance, and you 20 BEGIN
21 FOR indx IN 1 .. SQL%BULK_EXCEPTIONS.COUNT
dont consume enormous amounts of PGA. 22 LOOP
Yet I hesitate to hard-code the value. 23 l_bad_index := SQL%BULK_EXCEPTIONS (indx).ERROR_INDEX;
If over time this procedure needs to work 24
25 em_memes_pkg.log_error (
with more and more data, I may want to
26 error_code_in => SQL%BULK_EXCEPTIONS (indx).ERROR_CODE,
experiment with different limit values 27 error_msg_in => 'Unable to insert mention for incoming mention '
to see if I can coax more performance 28 || incoming_in (l_bad_index).meme_name
29 || '-'
out of the process without breaking the
30 || incoming_in (l_bad_index).source_name
PGA bank. 31 || '-'
By passing the limit value as a parameter, 32 || TO_CHAR (
33 incoming_in (l_bad_index).occurred_on,
I can change the value whenever I want
34 'YYYY-MM-DD HH24:MI:SS'));
without having to recompile the code. 35 END LOOP;
OK, Ive got the next N rows of incoming 36 END;
data. Now its time to move them to the 37 BEGIN
38 l_mentions.EXTEND (incoming_in.COUNT);
em_mentions table. 39
Phases 2 and 3: Unpack and record 40 FOR indx IN 1 .. incoming_in.COUNT
mentions. With phased processing, you do 41 LOOP
42 l_mentions (indx) :=
not unpack a single row and then insert it
43 em_memes_pkg.unpacked_incoming (incoming_in (indx));
into a table. Instead, you unpack all the rows 44 END LOOP;
fetched and then push them all into a table 45
46 FORALL indx IN 1 .. l_mentions.COUNT SAVE EXCEPTIONS
by using FORALL. In this case, all the rows
47 INSERT INTO em_mentions (meme_id,
fetched by get_next_set_of_incoming will 48 source_name,
be unpacked and pushed into the em_ 49 source_details,
mentions table with FORALL. 50 occurred_on)
51 VALUES (l_mentions (indx).meme_id,
52 l_mentions (indx).source_name,
Answer to Last Issues Challenge 53 l_mentions (indx).source_details,
54 SYSDATE)
55 RETURNING meme_id
The PL/SQL Challenge quiz in last issues
56 BULK COLLECT INTO l_affected_this_time;
Writing SQL in Oracle Application Express
57
article offered different ways to implement
58 add_to_affected_memes;
thequery for an Oracle Application Express
59 EXCEPTION
interactive report so that it could return data
60 WHEN bulk_errors
from two different queries. Choices (b) and
61 THEN
(c) are correct: you can use a table function
62 add_to_affected_memes;
or, for simpler scenarios, a union of queries
63
that aremutually exclusive. You cannot,
64 record_errors;
however, use a dynamic query with an inter-
65 END;
active report, so choice (a) is incorrect.
38 Start of the executable section: make room in the local nested table of mentions to hold all the
incoming data. So, Is It Faster?
It might be lots of fun to completely reorga-
4044 A classic Phase 2: for each of the incoming rows, convert it to the mentions format and load it into the
array. Notice the use of the same index value for the l_mentions collection as in the incoming_in collection. nize ones program in hopes of improving
Because incoming_in was populated with BULK COLLECT, it is either empty or filled sequentially from 1. performance, but we cant just assume that
4656 Time to push all that nicely prepared data into the em_mentions table with FORALL. Because the collection the resulting code actually does run quickly.
is sequentially filled from 1, use the simplest form for the FORALL header: The results the extremememe.info team
FORALL indx IN 1 .. l_mentions.COUNT and I found when we put together and ran a
test script (em_test.sql in the download for
If I used this form (very similar to a numeric FOR loop) and the collection had gaps (index values between
FIRST and LAST that are not defined), the procedure would fail with the ORA-22160: element at index [N] this article at bit.ly/QntyHo) were unam-
does not exist error. To avoid this problem, you can use INDICES OF or VALUES OF; the former is discussed biguous: the new em_update_status runs
in the Phases 2 and 3: Reset meme statuses section.
Next I use the RETURNING clause to capture the IDs of all mentioned memes. I need to use BULK between two and three times as fast as the
COLLECT for my RETURNING clause, because I am likely to insert more than one row and therefore will original procedure.
return more than one ID.
Not too shabby.
58 Call the add_to_affected_memes procedure. This is a procedure declared within the parent procedure. Its The Oracle-hosted online article concludes
implementation is very simple:
with an extremememe.info developer debrief.
9 PROCEDURE add_to_affected_memes A stevenfeuersteinonplsql.blogspot.com
10 IS
11 BEGIN blog post expands on this article to take you
12 affected_meme_ids_out := through the extremememe.info code changes
13 affected_meme_ids_out
14 MULTISET UNION DISTINCT l_affected_this_time; in a step-by-step process.
15 END;
It uses the MULTISET UNION operation to add the ID of the newly affected meme to the existing list of Steven Feuerstein
previously affected memes. By adding the DISTINCT keyword, I ensure that there will not be duplicates in the
resulting nested table. (steven.feuerstein@
oracle.com) is an
5964 Time to handle any errors during insertion into the em_mentions table. The WHEN clause references the
bulk_errors exception, which is declared at the top of the procedure. Within the handler, I call the add_to_ architect for Oracle,
affected_memes procedure. specializing in PL/SQL.
1736 The record_errors procedure iterates through the contents of SQL%BULK_EXCEPTIONS, a pseudocollection His books, including
of records that contains the index in the collection for which an error was returned by the SQL engine and the
error code. It is called a pseudocollection because it is only a partial implementation of an associative array;
Oracle PL/SQL Programming, and more
specifically, only the COUNT method is defined for this collection. than a thousand PL/SQL quizzes at PL/SQL
Table 2: unpack_and_record_mentions procedure line descriptions
Challenge (plsqlchallenge.com) provide in-depth
resources for PL/SQL developers.
Listing 3 shows the implementation of inserted that can be inserted. In the process,
Next Steps
the unpack_and_record_mentions pro- the unpack_and_record_mentions pro-
cedure. As you can see, it is much more cedure filled up the l_affected_meme_ids READ Oracle-hosted online article content
involved than the code required to fetch collection, so now its time to use that col- bit.ly/RryVWE
data. Thats because it contains an INSERT, lection to drive the second FORALL state- DOWNLOAD
which means that you have to pay a lot of ment, performing the updates against the Oracle Database 12c
bit.ly/fherki
attention to error processing. em_memes table.
scripts for this article
Table 2 includes descriptions of the In the original program, for each bit.ly/QntyHo
significant lines of code in Listing 3. These mention, the new meme status was TEST your PL/SQL knowledge
descriptions are out of order (not simply computed. If it was NULL, no update was plsqlchallenge.com
listed from the first to last lines), because performed. The new program will need READ more Feuerstein
I am again using nested subprograms to to incorporate these steps. The code for stevenfeuersteinonplsql.blogspot.com
bit.ly/omagplsql
improve readability. And that usually means reset_meme_statuses is shown in
READ more about
that you read from the bottom up: start with Listing 4, available in the Oracle-hosted Oracle Database 12c
the main executable section and then jump online article at bit.ly/RryVWE. oracle.com/database
to subprograms as needed. (The code in Listing 4 is also in the em_ BULK COLLECT and FORALL
Phases 2 and 3: Reset meme statuses. At update_status_new.sql file in the download bit.ly/12k0n8H
bit.ly/1onU8vi
this point, all meme mentions have been for this article at bit.ly/QntyHo). Table 3,
Oracle Database
3 WHERE t1.object_type = 'TABLE' Code Listing 1: Example table, slow query and plan, and faster query and plan
4 AND t1.object_id > ???;
maybe after a database upgrade, the opti- Code Listing 2: Getting a plan by using hints
mizer introduces a new query transforma-
tion/rewrite that invalidates your hint. SQL> SELECT /*+ first_rows(1) */ *
Ill demonstrate the shortest list of hints 2 FROM t t1
3 WHERE t1.object_type = 'TABLE'
you would need to ensure that the above
4 AND t1.object_id > (SELECT MAX(t2.object_id) - 500000 FROM t t2);
query uses the plan you want, and youll see
that this list of hints is much longer than any Execution Plan
list of hints you would have coded yourself.
Plan hash value: 1289158178
Another reason to avoid putting
hints into the query and to use SQL Plan
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)
Management is that you enable the opti-
mizer to evolve your query plan over time. | 0 | SELECT STATEMENT | | 1 | 97 | 4 (0)
That is, you wont freeze your query plan, |* 1 | TABLE ACCESS BY INDEX ROWID| T | 1 | 97 | 2 (0)
|* 2 | INDEX RANGE SCAN | T_IDX_TYPE | 1871 | | 1 (0)
and youll have the opportunity to use a
| 3 | SORT AGGREGATE | | 1 | 5 |
better plan in the future. If you fully hinted | 4 | INDEX FULL SCAN (MIN/MAX)| T_ID_PK | 1 | 5 | 2 (0)
the query, youd be stuck with whatever plan
you had today. See Baselines and Better
SQL> select /*+ opt_param( '_b_tree_bitmap_plans', 'FALSE' ) */ *
Plans at bit.ly/PWcxDU for a discussion of 2 FROM t t1
this query plan evolution. 3 WHERE t1.object_type = 'TABLE'
4 AND t1.object_id > (SELECT MAX(t2.object_id) - 500000 FROM t t2);
Now lets see how to get the plan
you want and then how to use SQL Plan Execution Plan
Management to put that plan in place and
Plan hash value: 1289158178
have it be used transparently by your query.
In a testing environment, I discovered that
by using either the FIRST_ROWS(1) or the | Id | Operation | Name | Rows | Bytes | Cost (%CPU)
OPT_PARAM( _b_tree_bitmap_plans,
| 0 | SELECT STATEMENT | | 94 | 9118 | 85 (0)
FALSE ) hint to disable the use of B-tree |* 1 | TABLE ACCESS BY INDEX ROWID| T | 94 | 9118 | 83 (0)
bitmap plans for this SQL statement, I get |* 2 | INDEX RANGE SCAN | T_IDX_TYPE | 1871 | | 6 (0)
| 3 | SORT AGGREGATE | | 1 | 5 |
the plan I want, as shown in Listing 2.
| 4 | INDEX FULL SCAN (MIN/MAX)| T_ID_PK | 1 | 5 | 2 (0)
Now, if I wanted to ensure that the
plan in Listing 2 is, in fact, the plan used
by default, I would need more than just a
FIRST_ROWS(1) or OPT_PARAM hint. In fact, provably better plan comes along? 8 end;
when I use DBMS_XPLAN to display not only First, I would capture a SQL plan baseline 9 /
the plans but also the full set of hints neces- for the existing querythe query with the 1
sary to reproduce this plan reliably, I see the bad plan. Why would I want to capture the
plan and the outline data in Listing 3. bad plan? To establish a SQL plan baseline for The database will still use that plan, but
As you can see in Listing 3, the full list this query (into which I will load the desired only because it is the only game in town
of hints in the outline data that you need plan), I need the plan baseline to exist before right now. So lets create something better:
is quite extensivefar beyond just the I can load the plan into it. I execute the code the first query plan in Listing 2the plan for
OPT_PARAM hint. I can assure you that in Listing 4 to create the baseline. the SELECT /*+ first_rows(1) */ * query.
properly hinting a query to repeatedly get That is my baseline, and that plan will be That is the plan I want. All I need to do
the same plan is much harder than it looks. used. But it isnt what I want. The next step is load that plan in place of the bad one, as
Also, I dont really want to freeze the plan is to disable that plan: shown in Listing 5, available in the Oracle-
forever, because future releases of Oracle hosted article at bit.ly/1hYmIyb.
Database will likely be able to rewrite the SQL> begin There are now two plans loaded for that
query or perform some optimization that 2 dbms_output.put_line( SQL statement: onethe bad planis
just doesnt exist yet, resulting in an even 3 dbms_spm.alter_sql_plan_baseline disabled; the otherthe good plan (even
better plan. Id like to be able to take advan- 4 ( sql_handle => though it is for a different query, it can
tage of future features, but if Ive hinted the 'SQL_e738c19a5191e8fd', work with this query)is enabled.
query, I wont be able to. 5 attribute_name => 'enabled', When I run the query again, as shown
So, what would the steps be to get the 6 attribute_value => 'NO' ) in Listing 6 (available in the Oracle-hosted
optimizer to choose the desired plan until a 7 ); article at bit.ly/1hYmIyb), I see that it used
Code Listing 3: Determining plan and outline info needed to make a better hinted plan the query plan baseline for my good plan.
With this baseline solution, there is
SQL> select * no permanent hintingand permanent
2 from table(dbms_xplan.display_cursor (sql_id=>'4rg4kcxr83kup', hinting is much harder to set up and use
3 cursor_child_no => 0, format=>'+outline'));
than you think it is! Many hinted queries
PLAN_TABLE_OUTPUT out there in production today may be
ticking time bombs.
SQL_ID 4rg4kcxr83kup, child number 0
And there are no upgrade issues with this
select /*+ opt_param( '_b_tree_bitmap_plans', 'FALSE' ) baseline solution. (You may have to com-
gather_plan_statistics */ * FROM t t1 WHERE t1.object_type = 'TABLE' pletely change all your hints after a database
AND t1.object_id > (SELECT MAX(t2.object_id) - 500000 FROM t t2)
upgrade as you add new query rewrites,
Plan hash value: 1289158178 access paths, and so on. With this baseline
solution, you wont.)
And, finally, if a better plan comes along,
| Id | Operation | Name | Rows | Bytes| Cost (%CPU)| Time |
youll be able to use it if you are using query
| 0 | SELECT STATEMENT | | | | 83 (100)| | plan evolution.
|* 1 | TABLE ACCESS BY INDEX ROWID| T | 91| 8827| 81 (0)| 00:00:01|
|* 2 | INDEX RANGE SCAN | T_IDX_TYPE| 1823| | 6 (0)| 00:00:01|
| 3 | SORT AGGREGATE | | 1| 5| | |
| 4 | INDEX FULL SCAN (MIN/MAX)| T_ID_PK | 1| 5| 2 (0)| 00:00:01|
Tom Kyte is a database
evangelist in Oracles
Outline Data Server Technologies
division and has worked
/*+ for Oracle since 1993. He
BEGIN_OUTLINE_DATA is the author of Expert
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE('11.2.0.2') Oracle Database Architecture (Apress, 2005,
DB_VERSION('11.2.0.3') 2010) and Effective Oracle by Design (Oracle
OPT_PARAM('_b_tree_bitmap_plans' 'false') Press, 2003), among other books.
ALL_ROWS
OUTLINE_LEAF(@"SEL$2")
OUTLINE_LEAF(@"SEL$1") Next Steps
INDEX_RS_ASC(@"SEL$1" "T1"@"SEL$1" ("T"."OBJECT_TYPE"))
PUSH_SUBQ(@"SEL$2")
INDEX(@"SEL$2" "T2"@"SEL$2" ("T"."OBJECT_ID")) ASK Tom
END_OUTLINE_DATA Tom Kyte answers your most difficult technology
*/ questions. Highlights from that forum appear in
this column.
asktom.oracle.com
Code Listing 4: Creating the baseline READ Oracle-hosted online article content
bit.ly/1hYmIyb
READ more Tom
SQL> begin
bit.ly/omagasktom
2 dbms_output.put_line(
3 dbms_spm.load_plans_from_cursor_cache Expert Oracle Database Architecture
4 ( sql_id => 'crvk9z6mx9n4d' ) amzn.to/ckGXaR
5 ); DOWNLOAD Oracle Database 12c
6 end; bit.ly/epBiUG
7 /
1 LEARN more about
Oracle Database 12c
SQL> select sql_handle, oracle.com/database
2 substr(sql_text,1,10)||'...'|| baselines
3 substr(sql_text,length(sql_text)-10) stext, Baselines and Better Plans
4 plan_name, enabled bit.ly/PWcxDU
5 from dba_sql_plan_baselines FOLLOW Tom on Twitter
6 where sql_text like @OracleAskTom
7 'SELECT%FROM t t1%(SELECT MAX(t2.object_id) - 500000 FROM t t2)';
FOLLOW Oracle Database
SQL_HANDLE STEXT PLAN_NAME ENA on Twitter
@oracledatabase
SQL_e738c19a5191e8fd SELECT * SQL_PLAN_fff61m98t3u7xda64b1bb YES on Facebook
... FROM t t2) facebook.com/oracledatabase
Copyright 2014, Oracle and/or its affliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affliates. Other names may be trademarks of their respective owners.
54 In the Field by carol hildebrand
the strategy that she and the board had. involved this year than last year. You dont
Oracle Magazine: Will you give a little per- have to run for president of OAUG, but take FOLLOW OAUG on Twitter
twitter.com/OAUG1
spective on that vision? a look to see where your involvement helps
Deploy Applications in
Different Environments
Organizations look to todays application server platforms to
run high-performance enterprise applications and services.
1956
1951 Tape Drive
The Remington Rand UNISERVO was the primary I/O
Hard Disk
The refrigerator-sized IBM 350 disk drive held 3.75 MB and
device on the UNIVAC I computer, and stored up to leased for US$3,200 a month. Inflation adjusted, thats
224 KB on a 1,200-foot-long metal tape. nearly US$28,000 todayor US$7,400 per MB.
1970s
Floppy Disks
Data storage in the 70s and into
the 80s? Floppy. From 8-inch to
5-inch to 3-inch, these disks
of thin, flexible magnetic storage
medium were state of the art. Just
ask your mom.
1999
2011
SD Cards
Initially 64 MB, the Secure
Digital (SD) memory card
2013
storage from SanDisk,
Matsushita, and Toshiba has
Extreme
been getting smaller in size Memory
and larger in capacity ever
2000
In a single rack, Oracles
since. (Todays MicroSD holds
Exadata Database
128 GB.)
Machine X4 supports
Storage from A to ZFS 88 TB of user data in
flasha capacity suffi-
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates.