Databases Reference
In-Depth Information
Caution Don't try to query the tables directly. Focus on the view. You don't want to waste your time trying to
sort out whether your debug data is contained in one table or spread across them both. Always query the view.
While it may seem odd that there are two underlying tables, APEX uses this two-table setup in a
number of places to keep a finite duration of data around. The table into which data is actually inserted
is switched every two weeks. When the switch occurs from one table to the other, APEX truncates the
table that it's switching to. This means that at a minimum it will have no data (i.e., no debug information
has been gathered) or potentially up to 4 weeks of data. Figure 6-27 gives a visual depiction of this idea.
Figure 6-27. The view and underlying tables that hold APEX Debug information
You may feel that having at most 4 weeks of data available to you at any one time might be too
limiting, and I would have to agree with you. If you want to keep more than that amount of data, you'll
have to take matters into your own hands. Doing this is actually quite straightforward.
First, you'll need to create a local version of the debug data table that you control. The simplest way
to do this would be the following:
CREATE TABLE MY DEBUG MESSAGES
AS
SELECT * FROM APEX DEBUG MESSAGES
WHERE 'X' = 'Y'
Search WWH ::




Custom Search