Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : FlexODBC IndexesSearch Forum

Forum Home > FlexODBC - ODBC Driver for DataFlex Embedded DBMS > FlexODBC Forum

 New Topic 
 
 Post Reply 
 FlexODBC Indexes 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-01-16 15:07:40

FlexODBC uses the ORDER BY clause in SQL and attempts to match the first fields (columns) of the ORDER BY to an existing index. If a match is found, that index is used for the sort order. If no match is found, the data is retrieved by the driver and sorted with a sort engine in memory.

If the ORDER BY clause and the WHERE clause use the same field names, the system will "jump-in" to the index to find records, and "jump-out" when the set is complete, increasing performance.

Here is the format of a command to recreate indexes:

sp_reindex ALL|tablename {as “path”} {ALL}|{Index#}|{#}

This command can be entered in our VBDEMO program, or your SQL command editor of choice. See the Security section for details on this. For example, you can re-create all of the indexes in your system using the following command:

sp_reindex ALL

You can also pass in parameters stating the single file to reindex as shown:

sp_reindex CustData

You can create a new index on an existing file with the following command:

CREATE UNIQUE INDEX 5 ON ANTIQUEOWNERS (OWNERLASTNAME,OWNERFIRSTNAME)

All indexes in DataFlex format tables are unique indexes. Add the RECORD_NUMBER field to the end of an index to allow the primary index fields to contain non-unique data.

Delete an index as follows:

DROP INDEX 5

Note: you will not be allowed to modify index files that you do not have security permissions for, see How do I use FlexODBC Security?  for details on this.

 

  Top 
 New Topic 
 
 Post Reply 

Jump to