oracle


Oracle nested queries performance


I am trying to build a complex query which has two levels (one parent query having a nested query). In a very low level I have something like this:
SELECT *
from (SELECT a.1 a1,
a.2 a2,
a.3 a3,
b.1 b1,
b.2 b2,
b.3 b3
from a
join b
on a.1 = b.1) sq
where sq.b3 = '123'
With this approach the query turns to take a lot of time while when doing like below is immediate...
SELECT *
from (SELECT a.1 a1,
a.2 a2,
a.3 a3,
b.1 b1,
b.2 b2,
b.3 b3
from a
join b
on a.1 = b.1
where sq.b3 = '123') sq
I understand that nested queries can affect the performance but I was expecting the optimizer to be able to "improve" it and bring more efficiency...
The thing is that I need to use the first approach as in the parent query I am putting quite a lot of validations that cannot be placed in the nested query due to the big coplexity of it...
What am wrong with?

Related Links

How to split amount to months using query?
Oracle - Updating table conditionally with concatenated value from another table
weblogic warnings reduces system performance
Oracle Discoverer BI: how to use DECODE into a calculation with a SUM
oracle matrix report filling null cells
What is the return datatype for the function TZ_OFFSET in oracle?
Trigger to get the tablespace query before creation?
Does Oracle use Intermediate Resultsets like SQL Server or Sybase?
Oracle Apex 4.1 Checkbox to update shuttle
Calling HTTP pages from Plsql
How to upgrade java version in Oracle 11g 11.2.0.1 [closed]
Oracle: how do I get a copy of the schema of the production DB onto a dev DB
Oracle Atomic Stored Procedure
Dapper with Oracle passing in DbParameter
Stored Procedure to comapre 2 fields and return mismactch in another table
Anyone can see what's wrong with this simple Oracle function?

Categories

HOME
ionic2
android-espresso
gaming
compilation
hid
website
websocket
mongoid
nsis
material-components
dji-sdk
sentry
gprs
cdi
joomla3.2
pyresttest
anchor
lda
lc3
fireloop
watch-os-3
nsstring
jquery-select2-4
powermock
smartgwt
stimulsoft
reselect
tomcat8
jqxgrid
fosuserbundle
scala-ide
pe
animated-gif
data-collection
offline-caching
points
macromedia
pyspark-sql
spring-annotations
microprocessors
nic
reporting
rspec-rails
appcode
java-stream
jade4j
uivisualeffectview
recovery
rdp
oauth2
get-event-store
viewcontroller
fiware-wirecloud
linq-to-excel
spongycastle
section508
viewmodel
icecast
supertest
brightscript
entropy
mura
polymaps
fitbit
d3v4
elastic4s
bilinear-interpolation
fuzzer
raw-sockets
apple-configurator
android-async-http
jeditable
verisign
as3-api
onepage-checkout
wepay
pack
ui4j
outlook.com
deeplink
stack-smash
http.client
enaml
knife
hmisc
uitest
physicsjs
console.log
directorysearcher
fasterxml
password-recovery
configurable-product
device-admin
ecos
commenting
spring-social-linkedin
objective-c-runtime
jsplitpane
gprof
towers-of-hanoi
uitextfielddelegate
struts2-s2hibernate
gamesalad
series-40
exponent
motodev-studio
simile
resharper-5.1
powergui
projectpier
gtktextview
acceleration
comment-conventions
service-factory

Resources

Encrypt Message