I am having some serious issue while loading Staging Table from Data Store. My query to load Staging table is taking more then 24 hours to execute.The three main tables are item_ledger_entry = 12 Million,Value_Entry=28 Million and Gl_Entry = 58 Million. The issue is Group By clause with is taking 95% CUP cost for SORT.
Please Help.
Thanks in Advance.
I can email you the query if required.
Voting to close- way too little information.
Typical approaches:
In general: Hire a specialist. Seriously – This sounds like a real high end project and people earn money with their knowledge. If you have a problem at this level, a lot of other things may be wrong, and a thorough answer is way beyond what you can ask here. For example – the query may not be your problem, the hwole approach may suck (as I said: avoid processing data to start with).