I 'm basically writing multiple group-by queries to get my data.
The code goes as mentioned below:
Code: Select all
select subquery.columnname
(select columns from table name
group by coulums)
group by colums where count (subquery.column) > 2
Now, I tried to insert this query in Oracle stage but it doesn't like the way query is gruped.I 'm processing about 150 million rows so performance is the key criteria. If I write this query in any standard SQL client it works perfectly fine and gives me my results but it takes L O T of time to get results. Therefore, I thought about using DS considering its exceptional parallel processing capabilities.
So, my question is:
How do I process the above mentioned query in Oracle stage?
I found a solution on my own is to create a dummy table and dump the records from above query in a table and then use that table data to create my join which simpler and faster. So, I used:
Code: Select all
Oracle Stage --> Aggregator --> Aggregator --> Oracle Stage
(to read table) (first group by) (second group by) (dummy table)
Thanks for your assistance.