High Skew Factor for a low volume data table

Database

High Skew Factor for a low volume data table

Hi All,

I have a query of the below format.

select

a.id,

c.name

b.test_code

from table1 a

left outer join table2 b on (a.code1=b.code1 and a.code2=b.code2)

inner join table3 c on (c.code1=a.code1 and c.code2=b.code2)

The skew factor of the above query is like around 95%.

The data volume in the table3 is also not so huge ( 4000 records )and the primary index are the fields used in the joins (cd3 and cd2).

I tried creating a temporary table as below

select

a.id,


b.test_code

from table1 a

left outer join table2 b on (a.cd1=b.cd1 and a.cd2=b.cd2)

and then join with the table3.

But still I was not able to see any change in the skew factor.

In both the cases, the data gets  retrieved in ~11 seconds.

Please guide me on how i can reduce the skew factor in the above case.

Let me know if more details are needed.

Thanks In Advance,

Regards,

Sherin