Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 11 to 16 of 16 total |
Procedure - is there a faster way? |
Fri, Jul 11 2008 8:41 AM | Permanent Link |
"John Hay" | Dieter
OK based on these structures the queries are SELECT Zahl_1,Zahl_2,COUNT(*) AS tot FROM (SELECT Zahl_1,Zahl_2,total.runde,count(*) from Zwei JOIN total ON total.zahl=Zwei.Zahl_1 or total.zahl=Zwei.Zahl_2 GROUP by Zahl_1,Zahl_2,total.runde HAVING COUNT(*) > 1) t1 GROUP BY Zahl_1,Zahl_2 If it does then maybe the following is worth a try UPDATE Zwei SET Zahl_3 = (SELECT tot FROM SELECT Zahl_1,Zahl_2,COUNT(*) AS tot FROM (SELECT Zahl_1,Zahl_2,total.runde,count(*) from Zwei JOIN total ON total.zahl=Zwei.Zahl_1 or total.zahl=Zweir.Zahl_2 GROUP by Zahl_1,Zahl_2,total.runde HAVING COUNT(*) > 1) t1 GROUP BY Zahl_1,Zahl_2) t2 WHERE Zwei.Zahl_1=t2.Zahl_1 and Zwei.Zahl_2=t2.Zahl_2) John |
Fri, Jul 11 2008 10:25 AM | Permanent Link |
Dieter Nagy | John,
wow great, it works perfect!!!!!!!!!!!!!! Thank you very much! Now it's a good day, the sun is shining and the SQL run perfect! Dieter "John Hay" <j.haywithoutdot@crbsolutionsremoveallthis.co.uk> wrote: Dieter OK based on these structures the queries are SELECT Zahl_1,Zahl_2,COUNT(*) AS tot FROM (SELECT Zahl_1,Zahl_2,total.runde,count(*) from Zwei JOIN total ON total.zahl=Zwei.Zahl_1 or total.zahl=Zwei.Zahl_2 GROUP by Zahl_1,Zahl_2,total.runde HAVING COUNT(*) > 1) t1 GROUP BY Zahl_1,Zahl_2 If it does then maybe the following is worth a try UPDATE Zwei SET Zahl_3 = (SELECT tot FROM SELECT Zahl_1,Zahl_2,COUNT(*) AS tot FROM (SELECT Zahl_1,Zahl_2,total.runde,count(*) from Zwei JOIN total ON total.zahl=Zwei.Zahl_1 or total.zahl=Zweir.Zahl_2 GROUP by Zahl_1,Zahl_2,total.runde HAVING COUNT(*) > 1) t1 GROUP BY Zahl_1,Zahl_2) t2 WHERE Zwei.Zahl_1=t2.Zahl_1 and Zwei.Zahl_2=t2.Zahl_2) John |
Fri, Jul 11 2008 12:29 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | John,
<< If it does then maybe the following is worth a try >> Man, I think lurkers will need to get drunk first before trying to read that query. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Jul 11 2008 1:35 PM | Permanent Link |
Dieter Nagy | Tim,
please can you take a look at my code and tell me, why the update within the procedure take long times. Thanks Dieter "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: John, << If it does then maybe the following is worth a try >> Man, I think lurkers will need to get drunk first before trying to read that query. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Jul 11 2008 6:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Dieter,
<< please can you take a look at my code and tell me, why the update within the procedure take long times. >> More than likely it's simply due to the fact that you're not using a transaction around a series of several thousand navigational updates. That results in several thousand writes to disk instead of just one or a handful. -- Tim Young Elevate Software www.elevatesoft.com |
Sat, Jul 12 2008 5:11 AM | Permanent Link |
Dieter Nagy | Tim,
OK, thanks. Dieter "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Dieter, << please can you take a look at my code and tell me, why the update within the procedure take long times. >> More than likely it's simply due to the fact that you're not using a transaction around a series of several thousand navigational updates. That results in several thousand writes to disk instead of just one or a handful. -- Tim Young Elevate Software www.elevatesoft.com |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |