Let's say I want to pull data for the TEST_TABLE table for some date. I create a query with FDA syntax:
select * from TEST_TABLE as of timestamp (timestamp 2021.05.05 15:00:15);
I want to check how exactly the query looks like in oracle engine. I.e. what are the conditions of this query, what tables are the data taken from etc....
Execution plan returned me this info:
Predicate Information (identified by operation id):
------------------------------------------
* 4 - filter(("STARTSCN"<=148411288669 OR "STARTSCN" IS NULL) AND "ENDSCN">148411288669 AND ("OPERATION"<>'D' OR "OPERATION" IS NULL) AND "ENDSCN"<=155682149589)
* 5 - filter("STARTSCN"<=148411288669 OR "STARTSCN" IS NULL)
* 7 - filter(("T"."VERSIONS_STARTSCN" IS NULL OR "T"."VERSIONS_STARTSCN"<=148411288669) AND ("T"."VERSIONS_ENDSCN" IS NULL OR "T"."VERSIONS_ENDSCN">148411288669) AND ("T"."VERSIONS_OPERATION" IS NULL
OR "T"."VERSIONS_OPERATION"<>'D'))
* 8 - filter(("ENDSCN"(+) IS NULL OR "ENDSCN"(+)>155682149589) AND ("STARTSCN"(+)<155682149589 OR "STARTSCN"(+) IS NULL))
* 9 - access("RID"(+)=ROWIDTOCHAR("T".ROWID))
But it's not quite what I'm looking for... When I add these into where section in TEST_TABLE the results are not the same.
If you are referring to which tables are used by Flashback Data Archive, a.k.a FDA, you need first to understand how Oracle works with Flashback query.
Let me show you an example. I will create a small flashback archive group and a table will be assigned to it.
Now, if I do a query
Let's check the plan
As you can see, Oracle is just accessing the table. Why ? Because the data is still in the undo tablespace, as the undo blocks have not yet expired. When you use FDA, Oracle will use always this approach when you use flashback query:
The underlying table contains the archive data based on the retention established for the archive group
If you are sure that the data you are recovering with
as of timestampis no longer in the undo tablespace, you can use a10046event to generate a trace file to really see how Oracle is really getting the data.Although I wonder what is you are looking for in getting that level of detail.