optimize ej (equijoin)

How do I optimize equijoin?

Table 1 has 500000 rows, Table 2 has 200,000 rows and I need to do equi join between them.

The resulting table should have about 20,000,000 rows. It takes about 20 seconds currently to run -

ej[`key;Table1;Table2]

I tried some attributes on the ‘key’ column to no avail.