Re: Can't understand why optimizer doesn't work properly :(
The original query
SELECT * FROM Messages WHERE Messages.Ask IN (SELECT Ask.Ask FROM Ask WHERE Ask.DateTime<20070710)
was rewritten by documentation:
SELECT * FROM Messages WHERE EXISTS (SELECT 1 FROM Ask WHERE Ask.Ask = Messages.Ask AND Ask.DateTime<20070710)
The `Ask` table has much less rows than the `Messages` table. And there is condition in select `Ask` table. So, the rows count in select will be even less.
How can I tell optimizer, that it should first select subquery an than select outer query? I can't use JOIN syntax, because this select is a part of Insert construction.
Subject
Views
Written By
Posted
3285
July 23, 2007 02:03PM
2249
July 23, 2007 07:21PM
2330
July 24, 2007 12:26AM
2142
July 24, 2007 02:08AM
Re: Can't understand why optimizer doesn't work properly :(
2359
July 24, 2007 02:42AM
2089
July 24, 2007 06:02PM
2205
July 25, 2007 11:10PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.