While system-wide tuning is not the best solution to SQL tuning itĬan be extremely helpful in tuning system with regular patterns of SQL Tune 10,000 SQL statements then you are forced to adjust system-wide
But when outer join these 2, it would take more than 20 mins. When I break this sql down into smaller pieces, like running "select * from fact1 where transactiontypeid = 1" and "select * from fact1 where transactiontypeid = 2" separately, each query only takes 5 seconds ave to return. The explain plan is showing that the query is scanning fact1 4 times, which is normal.
Select * from (select * from fact1 where transactiontypeid = 1) lįull Outer join (select * from fact1 where transactiontypeid = 2) d
The logic behind is that when fact1 with all the transaction type=1 outer join fact1 with all transaction type =2. There is a view that's created in the database call "v1",let's say. 1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.8K Oracle Database Express Edition (XE).3.7K Java and JavaScript in the Database.