SQL> exec DBMS_STATS.GATHER_TABLE_STATS('HR', 'EMPLOYEES', method_opt=>'FOR COLUMNS SIZE 254 JOB_ID'); With a histogram on JOB_ID in place the optimizer estimates the correct number of rows will be returned from the sales table as seen in Figure 10. Figure 10: Correct cardinality ...
SQL> exec DBMS_STATS.GATHER_TABLE_STATS('HR', 'EMPLOYEES', method_opt=>'FOR COLUMNS SIZE 254 JOB_ID'); With a histogram on JOB_ID in place the optimizer estimates the correct number of rows will be returned from the sales table as seen in Figure 10. Figure 10: Correct cardinality ...
SQL> exec DBMS_STATS.GATHER_TABLE_STATS('HR', 'EMPLOYEES', method_opt=>'FOR COLUMNS SIZE 254 JOB_ID'); With a histogram on JOB_ID in place the optimizer estimates the correct number of rows will be returned from the sales table as seen in Figure 10. Figure 10: Correct cardinalit...