Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slow SQL in combo in grid in many-to-many form
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Slow SQL in combo in grid in many-to-many form
Miscellaneous
Thread ID:
00056843
Message ID:
00056843
Views:
81
All right, I made my keys into character fields, since I'm using vfp3. Now the SQL that makes the combo.rowsource runs CPU usage to 100% (in the task manager) and the form takes forever to load and navigate.

My many-to-many form displays a record from a documents table, and, in a grid, lists related records from the Things table. The grid.recordsource is a parameterized view relating Docthings and things, called D_T. The one column's controlsource is D_T.Thing_id. The rowsource is SELECT thingnum, thing_id, thinggroup, thingdesc, thing_other, thing_other2, thingorder FROM things INTO CURSOR dummy WHERE thinggroup = cCurrentGroup ORDER BY thingorder. The combo.BoundColumn = 2. When my thing_id was numeric, I had to blank the controlsource. In the combo.valid, I would get the list item and stuff that value in the field. All of that worked without taking too long.

The idea of the combo is to select Things to associate with Documents. I'm pretty sure that changing the keyfields from Double to Character is what slowed it way down. But that doesn't make sense to me. How can I speed this thing up?
Reply
Map
View

Click here to load this message in the networking platform