Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index on a view
Message
 
 
To
15/06/2001 08:37:59
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00519876
Message ID:
00519903
Views:
21
You need to look at using a parameterized view instead of retrieving several thousand records from the server. This is way over the top. For my Oracle data, I have an initial query form where the users enter some values for some key fields. By key fields, I do not mean primary key fields. These would be fields like business name, last name, first name, city, zip code. I let them fill in as many or as few fields as they like. I also have a spinner next to each field that can be set any where from 0 to the number of fields they can specify. This is for setting which fields go in the ORDER BY clause and in what order.

I have an edit box on the form that displays the generated SQL. If they want, they can edit this code right before they submit it for execution. They can specify operators such as LIKE or = and use the SQL wildcards of _ and %.

I then use SQLEXEC() to return a results set with a primary key field which they never get to see or select for entry. This read-only results set is displayed in a grid in a second form. When the user selects a record, I use the PK as the parameter in a parameterized, updatable view that retrieves 1 record. This view is used in a 3rd, editing form.

>Using VFP6 SP4.
>
>We are creating a remote view to an Oracle table. This view contains several thousand records. We need to perform a LOCATE to find a record in this view.
>
>It appears that the locate in the view is slow. Is there a way to create a CDX tag or IDX index on this view? We need to update this view and send the changes back to Oracle.
>
>How can we speed up the LOCATE?
>
>Thanks,
>
>Jerryt
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform