Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Covered Index

Status
Not open for further replies.

perl1963

Programmer
Feb 26, 2003
19
0
0
US
Does foxpro 2.6 benefit from using a covered index?

Perl
Forum-Financial.com
 
Covered index are index that contains in its structure more information than the index key. For example if you have a query:
select name from custumers where birthdate beetween '01/01/99' and '01/31/99'

a simple index will be created containing birthdate column. A covered index will contain birthdate and name columns.

This construction will run more faster because SQL Server don't need go to table to retrive data (name column).

The disadvantage is more space taken by index and overhead on make changes at covered column.


which is the explaination give at the following URL:

Perl
Forum-Financial.com
 
Perl,
This is one of those yes-and-no answers. Yes, if you add an index for all the fields you may filter or join on, then the query may go faster. However, the indexes are just used to locate the record, FP will still have to read the data record to pull out the actual field data. The reason is that each index tag is logically in a separate tree inside the index file, so when the tree is search and the matching index(s) are found, the only thing that's there is a record pointer - there is no connection to any other index.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top