Skip to content

Commit

Permalink
filter by owner to improve runtime performance
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippSalvisberg committed Jun 15, 2017
1 parent c1e6838 commit 156345f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion database/demo/demo_script/02_demo_lineage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ SELECT line, col,
-- 12. where-lineage of all insert statements collected by PL/Scope (default behaviour)
SELECT *
FROM plscope_ins_lineage
WHERE owner = USER
ORDER BY owner, object_type, object_name, line, col,
to_object_name, to_column_name,
from_owner, from_object_type, from_object_name, from_column_name;
Expand All @@ -178,6 +179,7 @@ SELECT *
EXEC lineage_util.set_recursive(0);
SELECT *
FROM plscope_ins_lineage
WHERE owner = USER
ORDER BY owner, object_type, object_name, line, col,
to_object_name, to_column_name,
from_owner, from_object_type, from_object_name, from_column_name;
Expand All @@ -186,7 +188,8 @@ SELECT *
EXEC lineage_util.set_recursive(1);
SELECT *
FROM plscope_ins_lineage
WHERE from_object_type = 'TABLE'
WHERE owner = USER
AND from_object_type = 'TABLE'
ORDER BY owner, object_type, object_name, line, col,
to_object_name, to_column_name,
from_owner, from_object_type, from_object_name, from_column_name;

0 comments on commit 156345f

Please sign in to comment.