Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tuning SQL statement
Message
From
09/09/2004 12:39:20
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00940327
Message ID:
00940705
Views:
18
>Make sure you've indexes on all fields used in JOINs. Quick loock revealed that you don't have indexes in the Termcourse table for following joins
...
>   ON  Termcourse.roomid = Roomslist.roomid ;
>    INNER JOIN smagic!schedulehours ;
>   ON  Termcourse.hourid = Schedulehours.hourid ;
>    INNER JOIN smagic!teacherlist ;
>   ON  Termcourse.teacherid = Teacherlist.teacherid;
>...
>
I added those, but it's still not so good. I think what's causing it is
>>Joining table schedulehours and table termcourse (Cartesian product)
>>Joining intermediate result and table roomslist (Cartesian product)
>>Joining intermediate result and table programlist (Cartesian product)
>>Joining intermediate result and table teacherlist (Cartesian product)
>>Joining intermediate result and table courses (Cartesian product)
>>Joining intermediate result and table courselist (Cartesian product)
>>Joining intermediate result and table enroll (Cartesian product)
>>Joining intermediate result and table attendance (Cartesian product)
>>Joining intermediate result and table person (Cartesian product)
these Cartesian joins. The WHERE Termcourse.crsschedid = (?vp_crsschedid) will filter it down to the 29 record result, so how do I make it evaluate the where clause early?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform