Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb0dab7

Browse files
committed
Additional cardinality hint.
1 parent a966451 commit eb0dab7

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

source/expectations/data_values/ut_compound_data_helper.pkb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ create or replace package body ut_compound_data_helper is
9191
l_results tt_column_diffs;
9292
begin
9393
l_column_filter := get_columns_row_filter(a_exclude_xpath, a_include_xpath);
94+
--CARDINALITY hints added to address issue: https://github.com/utPLSQL/utPLSQL/issues/752
9495
l_sql := q'[
9596
with
9697
expected_cols as ( select :a_expected as item_data from dual ),
@@ -100,7 +101,8 @@ create or replace package body ut_compound_data_helper is
100101
e.*,
101102
replace(expected_type,'VARCHAR2','CHAR') expected_type_compare
102103
from (
103-
select rownum expected_pos,
104+
select /*+ cardinality(xt 100) */
105+
rownum expected_pos,
104106
xt.name expected_name,
105107
xt.type expected_type
106108
from (select ]'||l_column_filter||q'[ from expected_cols ucd) x,
@@ -117,7 +119,8 @@ create or replace package body ut_compound_data_helper is
117119
select /*+ cardinality(a 100) */
118120
a.*,
119121
replace(actual_type,'VARCHAR2','CHAR') actual_type_compare
120-
from (select rownum actual_pos,
122+
from (select /*+ cardinality(xt 100) */
123+
rownum actual_pos,
121124
xt.name actual_name,
122125
xt.type actual_type
123126
from (select ]'||l_column_filter||q'[ from actual_cols ucd) x,

0 commit comments

Comments
 (0)