I.T. Discussion Community!
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

April Edition
Subscribe now! It's Free!
Enter your email:

   ► KBDesktop Data...Paradox & Ob...Interactive ...   Print This     
  From the March 2008 Issue of Prestwood eMag
 
Interactive Paradox: Using Data:
How to Sort a Paradox Table Using an Index
 
Posted 12 years ago on 4/5/2007 and updated 3/24/2009
Take Away:

You can use Format | Filter while viewing a table to apply a secondary index.

KB100508



Using a Secondary Index 

To sort a table you are viewing using an existing secondary index, use the Filter menu option.
Step by step:
  1. Select File | Open | Table to view a table that has a secondary index.
  2. Select Format | Filter and choose the secondary index you wish to use.
  3. Select Okay.
I realize "filter" is NOT sorting but in Paradox, you use the Filter option to sort. You can also use the Format | Sort option while viewing a table to sort a table but that creates a duplicate table to do the sort. To add salt to the wound, in MS Access you can simply right click on a table column and select either Sort Ascending or Sort Descending.

Creating a Secondary Index

To create the needed secondary index, restructure a table (select Format | Restructure while viewing the table) and use the Secondary Index tab to create an index.


Comments

1 Comments.
Share a thought or comment...
Comment 1 of 2

I have created my indexes my questions is can I use these indexes in my sql or qbe to make my queries faster? If so, could you kindly guide me through how to do it? Thanks

Posted 10 years ago

Comment 2 of 2

Yes, when you create indexes, QBE and SQL queries will be faster. This is automatic, you don't have to do anything. You don't want to randomly put a bunch of secondary indexes on your tables so the trick is to add the secondary indexes that will help. When a query is slower than expected, analyze the query to see what fields it is grouping and sorting on. For example, if a query is using State and City fields for grouping and/or sorting, you might consider adding a State>City and/or a City secondary index.

The exception to the "it's used automatically" is when coding. For example, if you use a TCursor to perform a task, you might get faster execution if you first switch to an appropriate secondary  index using ObjectPAL's switchIndex method.

Posted 10 years ago
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1222A1
Enter key:
KB Post Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #100508 Counter
13729
Since 4/2/2008
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech