The Oracle Learning Library team recently rolled out their new mobile application. If you go to http://www.oracle.com/oll, you should see a mobile icon in the upper left. Or you can simply bookmark this link on your mobile device.
As I discussed in the past, the Oracle Learning Library isn't just about Oracle Application Express or the Oracle Database. There is content there for virtually every Oracle product offered - JD Edwards, NetBeans, Solaris, Java, Oracle Business Intelligence, Fusion Middleware, Oracle E-Business Suite, etc. There are tutorials, white papers, Oracle By Examples, demonstrations, data sheets, and more.
And at the risk of being criticized (again), I can proudly proclaim that this is all running entirely on Oracle Application Express at http://apex.oracle.com - the same hosted instance of Oracle Application Express that gets over 10 million page views a week and between 600 - 700 new workspace requests every week.
(YABAOAE) Yet Another Blog About Oracle Application Express
Thursday, January 26, 2012
Oracle Learning Library Mobile
Thursday, December 15, 2011
Oracle Learning Library Advertisement Video
The Oracle Learning Library team just published a new advertisement video, promoting the Oracle Learning Library. OLL is a great, free source for a lot of technical content on virtually every Oracle product. Just be sure you turn your volume down before playing this video - the music is quite loud.
You may ask why I'm promoting this on an APEX blog. Well, it's because:
You may ask why I'm promoting this on an APEX blog. Well, it's because:
- The Oracle Learning Library application itself is written in Oracle Application Express.
- There is a wealth of Oracle Application Express content available in the OLL.
- It's yet one more application that runs successfully on apex.oracle.com. This application alone accounts for over 2M page views/events per week on apex.oracle.com
Wednesday, December 14, 2011
High CPU Usage and APEX (again)
A couple months ago, I wrote about a customer who was experiencing High CPU Waits presumably from Oracle Application Express. Well, earlier this week I was at another customer site with exactly the same problem.
This was a case of "the business users" using Oracle Application Express to build an application. The application was built in short order and well received by the end users. The application became popular, they expanded the application and grew the user base, and after moving it to a different and faster environment, they hit a wall. The DBA's performed some analysis on the application, and based upon the Active Session History reports, they concluded that the statements using the most CPU were all from Application Express and of the form:
The problem was, as I tried to explain to the DBA's, this PL/SQL block merely reflected the execution of a page view in Application Express. The ASH report will aggregate the "top" sections by top-level call, but the problem really lies within these calls, with what the application developers coded in their application. For all practical purposes, the overhead of the APEX engine is fixed, and anything else beyond that is what is coded inside of the application by the application developer. The DBA's asked a very reasonable question, namely "what do we do next?"
We started the process by analyzing the activity log of Oracle Application Express for the particular time window, to identify what was consuming the vast majority of time. And we were able to produce a nice listing of applications and pages, sorted by average execution time (really no differently than what I posted earlier). But once we did this, the DBA's wanted to be able to drill down into what was executing on those pages so they could analyze it and tune it. Given that the vast majority of this customer's primary application used SQL Reports and Interactive Reports, we joined the activity log with the APEX view which contained the SQL statements for the reporting regions on those pages (APEX_APPLICATION_PAGE_REGIONS). We ended up with the following query:
This query can also be issued directly from SQL*Plus by the DBA's. If they connect as SYS or as a user who has been granted the database role APEX_ADMINISTRATOR_ROLE, in Application Express 4.1, they will be able to query across all workspaces and APEX applications on the instance.
Understand that there are many places in an application which could be causing performance issues. There could be slow queries in an authorization scheme that is used in multiple places on a page. There could be processes or validations or elements on page 0 or a slow page sentry or a host of other things that could be causing degraded performance and which would become apparent when debugging a page. But to identify the report queries on pages and associate those with the activity log and slowest performing pages, the above query is a great place to start.
This was a case of "the business users" using Oracle Application Express to build an application. The application was built in short order and well received by the end users. The application became popular, they expanded the application and grew the user base, and after moving it to a different and faster environment, they hit a wall. The DBA's performed some analysis on the application, and based upon the Active Session History reports, they concluded that the statements using the most CPU were all from Application Express and of the form:
declare
rc__ number;
simple_list__ owa_util.vc_arr;
complex_list__ owa_util.vc_arr;
begin
owa.init_cgi_env(:n__, :nm__, :v__);
htp.HTBUF_LEN := 63;
null; null;
simple_list__(1) := 'sys.%';
simple_list__(2) := 'dbms\_%';
simple_list__(3) := 'utl\_%';
simple_list__(4) := 'owa\_%';
simple_list__(5) := 'owa.%';
simple_list__(6) := 'htp.%';
simple_list__(7) := 'htf.%';
simple_list__(8) := 'wpg_docload.%';
simple_list__(9) := 'ctxsys.%';
simple_list__(10) := 'mdsys.%';
if ((owa_match.match_pattern(p_string => 'f' /* */, p_simple_pattern => simple_list__ , p_complex_pattern => complex_list__ , p_use_special_chars => false))) then
rc__ := 2;
else
null; null; f(p=>:p);
if (wpg_docload.is_file_download) then
rc__ := 1;
wpg_docload.get_download_file(:doc_info);
null; null; null;
commit;
else
rc__ := 0; null; null; null; commit;
owa.get_page(:data__, :ndata__);
end if;
end if;
:rc__ := rc__;
end;
The problem was, as I tried to explain to the DBA's, this PL/SQL block merely reflected the execution of a page view in Application Express. The ASH report will aggregate the "top" sections by top-level call, but the problem really lies within these calls, with what the application developers coded in their application. For all practical purposes, the overhead of the APEX engine is fixed, and anything else beyond that is what is coded inside of the application by the application developer. The DBA's asked a very reasonable question, namely "what do we do next?"
We started the process by analyzing the activity log of Oracle Application Express for the particular time window, to identify what was consuming the vast majority of time. And we were able to produce a nice listing of applications and pages, sorted by average execution time (really no differently than what I posted earlier). But once we did this, the DBA's wanted to be able to drill down into what was executing on those pages so they could analyze it and tune it. Given that the vast majority of this customer's primary application used SQL Reports and Interactive Reports, we joined the activity log with the APEX view which contained the SQL statements for the reporting regions on those pages (APEX_APPLICATION_PAGE_REGIONS). We ended up with the following query:
select sum(elapsed_time), count(*),
to_char(avg(elapsed_time),'9999.99') avg_elap,
a.application_id||':'||a.page_id app_and_page,
dbms_lob.substr(b.region_source,2000,1)
from apex_workspace_activity_log a
join apex_application_page_regions b
on a.application_id = b.application_id and a.page_id = b.page_id
where a.view_date between to_date('201112142100','RRRRMMDDHH24MI')
and to_date('201112142105','RRRRMMDDHH24MI')
and a.page_id is not null
and b.source_type like '%Report%'
group by a.application_id||':'||a.page_id, dbms_lob.substr(b.region_source,2000,1)
having count(*) > 10
order by 3 desc
This query can also be issued directly from SQL*Plus by the DBA's. If they connect as SYS or as a user who has been granted the database role APEX_ADMINISTRATOR_ROLE, in Application Express 4.1, they will be able to query across all workspaces and APEX applications on the instance.
Understand that there are many places in an application which could be causing performance issues. There could be slow queries in an authorization scheme that is used in multiple places on a page. There could be processes or validations or elements on page 0 or a slow page sentry or a host of other things that could be causing degraded performance and which would become apparent when debugging a page. But to identify the report queries on pages and associate those with the activity log and slowest performing pages, the above query is a great place to start.
Monday, November 21, 2011
Oracle Application Express / Oracle Access Manager Integration White Paper now available
David Peake, the product manager of Oracle Application Express, recently published on the APEX OTN site a white paper describing how to integrate Oracle Application Express 4.1 with Oracle Access Manager 11g. If you go to the Learn More section on the Application Express site on OTN, look for it in the bottom section entitled "Technical Information and White Papers". It's the one with the (obvious) title of Integrating Oracle Application Express with Oracle Access Manager.
Many thanks to Christian Neumueller from the Application Express team and Ramana Turlapati from the Access Manager team for all their efforts in this integration and white paper.
Tuesday, November 08, 2011
Adjusting the Width of an Interactive Report Filter Textbox
I learn something new every day.
Today, Oracle Support sent the following customer question my way:
Today, Oracle Support sent the following customer question my way:
"We have columns with long data value but the filter (while running a Interactive report) in action menu is of fixed width and hence difficult for us to view the complete data. Is there a possibility for increasing the size of the filter dialog ? (which contains Columns, Operator and Expressions)."
When I asked for clarification, I received the following picture:
I'll never claim to know it all. But I will claim to know the people who collectively do know it all. Shakeeb Rahman from the Application Express development team replied with a simple solution. As Shakeeb stated:
"We can target the expression field and its drop down menu using the IDs that are assigned to these items. Here is the style that you would put into your page header to give these two items a fixed width:"
<style>
#apexir_EXPR, #apexir_col_values_drop { width: 300px; }
</style>
And that's all there is to it. If you want to adjust the width of the expression field and the associated drop down menu, simply add this inline style to the page header attribute on the page where your Interactive Report is defined.
Wednesday, October 26, 2011
High CPU Waits and SQL from Oracle APEX
I was recently at a customer site helping one of the DBAs diagnose a performance issue on their rather large Oracle Application Express instance (over 800 production applications on the one instance). This gentleman self-admittedly didn't know all that much about APEX but he was adept at producing and analyzing ASH (Active Session History) and AWR (Active Workload Repository) reports.
He showed me the extraordinarily high CPU times between 0900 and 1100 his time, and he traced it to the following PL/SQL block that "comes from APEX":
declare
rc__ number;
simple_list__ owa_util.vc_arr;
complex_list__ owa_util.vc_arr;
begin
owa.init_cgi_env(:n__, :nm__, :v__);
htp.HTBUF_LEN := 63;
null; null;
simple_list__(1) := 'sys.%';
simple_list__(2) := 'dbms\_%';
simple_list__(3) := 'utl\_%';
simple_list__(4) := 'owa\_%';
simple_list__(5) := 'owa.%';
simple_list__(6) := 'htp.%';
simple_list__(7) := 'htf.%';
simple_list__(8) := 'wpg_docload.%';
simple_list__(9) := 'ctxsys.%';
simple_list__(10) := 'mdsys.%';
if ((owa_match.match_pattern(p_string => 'f' /* */, p_simple_pattern => simple_list__ , p_complex_pattern => complex_list__ , p_use_special_chars => false))) then
rc__ := 2;
else
null; null; f(p=>:p);
if (wpg_docload.is_file_download) then
rc__ := 1;
wpg_docload.get_download_file(:doc_info);
null; null; null;
commit;
else
rc__ := 0; null; null; null; commit;
owa.get_page(:data__, :ndata__);
end if;
end if;
:rc__ := rc__;
end;
I've worked with Oracle Support on issues exactly like this from other customers too, so it seems to be a common problem "with APEX".
As I explained to this customer:
- The engine of Oracle Application Express is written in SQL and PL/SQL.
- When someone performs a page request from their browser to the Application Express engine, they are ultimately calling a PL/SQL procedure which is the entry point into APEX.
- Oracle Application Express is front-ended by a Web server which has some facility to map requests in the URL to execution of the APEX engine - this is usually either Apache & mod_plsql or the APEX Listener or the XDB HTTP Protocol Server & embedded PL/SQL Gateway.
- This "agent" on the Web server prepares an anonymous PL/SQL block for each and every request into the APEX engine. The PL/SQL he was showing me was exactly this anonymous PL/SQL block.
To state this succinctly and in more lucid terms, the PL/SQL block he was showing me wasn't anything out of the ordinary. I saw an anonymous PL/SQL block which was ultimately calling the APEX engine (via the code in the block: f(p=>:p); ). And since he showed me that this specific PL/SQL block executed about 800K times in an hour, I said that this directly correlated to the number of page events on his system, e.g., the number of times a page was rendered or posted or report paginated. He needed to drill down into the APEX instance and see what was consuming the vasty majority of execution time within APEX.
While there are nice instance administration reports in APEX to convey this type of information, this DBA didn't have instance administration access - poor guy. So we did some very basic queries against the APEX views to return the necessary information.
One of the most relevant views for him was APEX_WORKSPACE_ACTIVITY_LOG. Connecting as SYS (or in APEX 4.1 or later, connecting as SYS or a database user granted the APEX_ADMINISTRATOR_ROLE database role), we are able to see all information across all applications and workspaces. So we came up with a very easy query to pinpoint the slowest pages on the system during his time window:
select workspace, application_name, application_id, page_id, count(*) total_page_events, avg(elapsed_time) avg_elapsed_time, sum(elapsed_time) elapsed_time
from apex_workspace_activity_log
where view_date between to_date('201110260900','RRRRMMDDHH24MISS') and to_date('201110261100','RRRRMMDDHH24MISS')
group by workspace, application_name, application_id, page_id
order by 6, 7 asc
Thus, using this query, I was then able to tell him which application and page was consuming, on average, the most time on his system. Then, using this information along with other APEX views, we were able to identify the workspace names, applications, pages, report queries and eventually the administrators of these workspaces and applications so they could begin their own analysis and tuning exercise.
Sunday, August 28, 2011
Who uses apex.oracle.com (as of August 28, 2011)?
I was recently browsing a blog post over at ApexNinjas.com, where they showed the breakdown of visitors by country to their site, and found that most developers visiting their site came from the U.S. and Germany and asked the "guys who manage apex.oracle.com" if they could confirm this. From time to time, I like to post the Google Analytics report for apex.oracle.com, so people can see where users are coming from.
Note that I only capture the Google Analytics information from the apex.oracle.com login page and nowhere else.
Here is the map overlay and table by country of visitors to the login page.
My interpretation of this report:
- This report should not be used to determine the primary geographies of Application Express developers. There are countless developers who happily use APEX yet never visit the login page of apex.oracle.com.
- The U.S. consistently has more visits than any other country.
- Since I did this same exercise in 2008, there has been a significant increase from India.
- Canada has also climbed into the top 5.
- Poland and Brazil have vaulted into the top 10. Three years ago, Brazil was 23rd, now they are 7th. Impressive.
Subscribe to:
Posts (Atom)

