Forum Post: RE: INDEX

  • Thread starter Thread starter Bill Wood
  • Start date Start date
Status
Not open for further replies.
B

Bill Wood

Guest
I second Dr. Mercer-Hursh's suggestion. Understanding INDEXES is the best thing you can do if you want to use a relational database. INDEX concepts are important generally for getting good performance as your database grows, and not just for OpenEdge. There is lots of detail in the OpenEdge Documentation (Communites has a link to it here ). Two good starting places are Database Essentials Getting Started with Progress ABL These will tell you that an INDEX is a concept used by the database engine to speed up the retrieval of information. Indexes have a downside. They impose additional writes and storage consumption by the data structures used to maintain the index whenever a record is updated. Without an index, the database engine must read and compare every record in the database table when a query is performed. With an index, 'random' records can be accessed quickly, and in order. You do need to understand INDEXES to use them correctly. Too many indices will increase database size, and increase the time to do Create, Update, and Delete operations. For a beginner with Relational Databases, limit their use until you have more expertese. A database table can have many indices. Typically, if there is a single key field that will be used to look up records (or used to relate other tables), then this is PRIMARY KEY. It is good practice to INDEX your primary key. You can index fields that are not unique if you want to commonly search for the values of these fields. Looking for residents or customers by zip code, or state, may be done, even though many records share the same state or zip code. Indexing the customer.zipCode or resident.state would have an index that is not unique. A UNIQUE INDEX would be something like Social Security Number, or EmployeeID -- fields that are not shared by more than one record. OpenEdge supports a type of index called a WORD INDEX. A word index is used to find 'words' and phrases in large text fields that contain free-form text (like a Product.Description, or a Employee.Resume field). The word index parses the long text fields and stores a list of the words in each. You can then more efficiently look for records that contain collections of natural language words (even if the fields are not 'exactly equal' to those words or phrases. Again the first place you should look is the documentation. There are also a number of good Knowledge Base articles on the Progress web site. (see http://knowledgebase.progress.com). Other great resources are presentations from past Progress Exchanges, or from the Progress User Group PUG Challenges. See the links and downloads which often include Audio as well as the Presentations at: http://pugchallenge.org/ (PUG Challenge Americas) -- Look at the Downloads section http://www.pugchallenge.eu (EMEA PUG Challenge) Good luck.

Continue reading...
 
Status
Not open for further replies.
Back
Top