Danny Tramnitzke wrote:
> 
> Hi all back
> 
> Today I tried out the 25-BuildVersion of sapdb, hopening for 
> a performance 
> increase. But there is still a Query, which takes more than 
> 10 minutes ( 
> after that time I killed the process).
> 
> So I seperated the subqueries from that Query, and found out, 
> that they are 
> the main reason for the performance lag. They take about 20 
> seconds while 
> first executing. Strange: they only take 2-3 seconds, while 
> executing them 
> a second or a thirt time.. (maybe, there is saved some DATA 
> in a Cache ? )
> But I guess, the main problem are the ca. 20 seconds, they 
> need the first 
> time. So the hole query has 3 Subqueries. The main Query without the 
> subqueries takes only some seconds, and so should it be.
> 
> The Subqueries have the following form :
> 
> (
> Select 1 from SYSDBA.DUAL where exists (
> select a.column from view a, view b, view c where condition1 
> and condition2 
> and condition3 and condition4 and condition5 and not exist (
> select d.column from view d, view e, view f where condition1 
> and condition2 
> and condition3 and condition4 and condition5)
> )
> 
> 
> You see, there are also Subqueries in Subqueries.
> The EXPLAIN Statement tells me, that there is only one 
> Tablescan on the 
> DUAL Table, else only used Indices.
> The Statistics is also up to date...

I do not think that you told us all what is needed.
Exists-Subqueries are ... well, strange, not to say stupid
if they do not include correlations.
Therefore I assume you do not have a simple subquery
(as it seems if your shortened 'example' is seen) but
a correlated subquery.
But then I do not know how you could seperate those
subqueries from the whole subquery without changing the conditions.

To shorten things:
please provide the real statement and the explain for this.

Thank you
Elke
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to