Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 21 to 24 of 24 total |
Another tricky sql :) |
Tue, Mar 17 2009 7:34 AM | Permanent Link |
at | John,
> What are the actual times taken? I had to remove some unimportant statements from the stored procedure: the clear time just for this statement is 1.54 sec. (this is not much, I know, but on the slow machines of my client it can take 5 times longer. > What is the rowcount of the resultset? 70.000 records in the table untersuchungen, 51 in the resulting dataset. > If you change the left outer join to just join does it make any difference? Time is 1.21 sec. then, but I don't think an inner join is possible here because there can be null values on the right side. > Just as an aside, and it will probably run slower than the first query, you > can use Tim's very excellent correlated subquery to get the result without > an explicit join I cancelled the execution after 5 minutes. Thanks Uli |
Tue, Mar 17 2009 8:06 AM | Permanent Link |
"John Hay" | Uli
>Time is 1.21 sec. then, but I don't think an inner join is possible here >because there can be null values on the right side. I think inner join must be OK as (if) the SQL Condition for selecting the count distinct is the same as the SQL Condition for the other fields. > I cancelled the execution after 5 minutes. Hehe. I though it might be quite nasty. John |
Thu, Mar 19 2009 1:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Ulrich,
<< I know: it is just theoretical, but it would be interesing to know why. >> Most of the time this type of difference can simply be chalked up to the difference between querying a static temporary set of data that is private to your session vs. querying a live table. The latter has to performance locking and change detection that the former does not. I can't say for sure that this is entirely the case here without examining the the script and SQL in great detail, but it is usually the difference. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Mar 19 2009 1:40 PM | Permanent Link |
Uli Becker | Tim,
> I can't say for sure that this is entirely the case here without examining > the the script and SQL in great detail, but it is usually the difference. Interesting - Thanks! Uli |
« Previous Page | Page 3 of 3 | |
Jump to Page: 1 2 3 |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |