An APEX page that loads in eight seconds will be abandoned, no matter how complete the fields are. Tuning starts with the statement that actually runs, not with a larger application server.
Find the slow statement
Turn on debugging for one session and open the page once. Note the SQL or PL/SQL that dominates elapsed time. Typical causes:
- An interactive report with no selective predicate over a large EBS transaction table.
- A query per row (a function call or a correlated subquery in the select list).
- An Ajax callback that runs on every keystroke.
- Session state computations that execute on every page view.
Fetch only the columns and rows the page shows. Filter by operating unit, organization, customer, or date in the SQL, not after the fact in the browser.
Indexes and statistics serve APEX too
APEX does not get a special optimizer. If the page filters by a custom reference column, that column needs an index and fresh statistics, just as it would for a concurrent program. Avoid wrapping the filter column in a function unless you have a matching function-based index.
For interactive grids, cap the number of rows, require at least one search filter on very large sets, and do not enable editing on columns the user never changes. Each extra process on save is another round trip.
Page design
- Use classic or interactive reports for analysis, and a form for the single record. Do not build a grid of five thousand editable rows “because Excel does.”
- Defer detail regions until the user selects a row.
- Cache lists of values that rarely change, and restrict cascading lists so they do not scan the item master unfiltered.
- Keep JavaScript small. Rewriting the DOM after every refresh hides a slow query instead of fixing it.
Checklist
- Debug output names the slow statement.
- Predicates match indexes and include a business filter.
- Row-by-row functions are removed from the main query.
- Large grids require a filter and a row cap.
- The page was timed on a production-sized clone.
An APEX portal that users call slow is usually one query. Contact Solution Markaz for a review.