Advice of tuning a big SQL query
I recently had a SQL statement sent to me for tuning. It is pretty complex. I broke it down and it consists of dozens and dozens of lines, many, many joins, many sub queries and a lot of compound queries, i.e. set operators like UNIONs, etc. Unfortunately my trusty Oracle SQL tuning advisor is not working, long story there so I have to go old school here which is fine. I manually ran the query myself and I experience the same long query run time. I obtained the execution plan from auto trace (so I know it's the plan Oracle