Disclaimer

Wednesday, 21 July 2021

Skewed Data

You can have a column named GENDER with two possible values MALE or FEMALE; which is not skewed.

you can have a column named INVOICE_STATUS with two possible values of OPEN or CLOSED; which is skewed since most invoices are CLOSED 

.

SQL> create table emp (ename varchar2(50), esex varchar2(10));


Table created.


SQL> insert into emp select object_name,'Male' from dba_objects;


9369 rows created.


SQL> commit;


Commit complete.


SQL> insert into emp select object_name,'Female' from dba_objects where rownum < 20;


19 rows created.


SQL> commit;


Commit complete.


SQL> select esex,count(*) from emp group by esex;


ESEX         COUNT(*)
---------- ----------
Female             19
Male             9369

No comments:

Post a Comment

Understanding SQL Plan Baselines in Oracle Database

  Understanding SQL Plan Baselines in Oracle Database SQL Plan Baseline is the feature in Oracle started from Database 11g that helps to pre...