Hi all,
If I have two table of cod-desc, T1 and T2,
and I need to create all possible combination,
other than using cartesian product,
is there another way more optimal to do that?
Suppose every table has 1M rows.
RDBMS= Oracle 11G.


If both tables have 1M rows, then you potentially have 1T (trillion) rows of output. How many years can you wait for an answer? Show the schema of T1 and T2 please.

I wrote both table have two columns, code (varchar2(10)) and desc (varchar2(100)).
Yes, at most 1M of rows per table.
I can't apply some pre-filter to single table,
I can apply filters to combination of two field "code", and in that case total final number of rows decreases considerably.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.