Oct 10, 2012

Backtrack FF Route name from route text



Sometimes, there can be a need to find out the FF route name given the route query.
This is the usual case while debugging Oracle Payroll performance issues.
If the expensive query that is found from the raw/tkprof formatted trace files is 
route query, it needs to be backtracked to find the FF route name.

FF Route text is stored in "text" column of ff_routes_f table.
But it's a long column, so it can't be matched with LIKE keyword.

Using the following code snippet a long column can be searched with LIKE keyword.

create global temporary table pv_test_temp(route_id number, text clob);

insert into pv_test_temp
select route_id,TO_LOB(text) text from ff_routes;

select * from ff_routes where route_id in 
(select route_id from pv_test_temp where text LIKE '%PBF%')

No comments:

Post a Comment