Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 To: Steven Black
  Where is Steven Black?
 Kingston
 Canada
 Steven Black
 Tags
Subject: RE: index on fields in another tables
Thread ID: 22531 Message ID: 22657 # Views: 21 # Ratings: 0
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Wednesday, April 23, 2003 1:45:57 PM         
   


> Offhand I would say no, this isn't a good practice in a file-based data environment like VFP.
>
> What is your use case that requires this?
>
> Assuming you really have a need for this, this would be a reason to de-normalize your data, so to carry those fields in the table that needs the index. Consider doing that instead, especially if your data is static. Another option is to use an indexed view. I'd say that either denormalization or an indexed view is better (much more reliable) than what you suggest.
>
> **--** Steve
>
> > Is it ok to index on fields in other tables. I need to create many such indexes with a combination of fields from table1 and table2.
> > It is working but is it safe and reliable?


Hi,
Actually, I have never heard of doing this before, indexing on two fields in two different tables.
Certainly not the norm. I would do what Steve suggests, get your two index fields into one
table and index them there.

Pete from the Great White North. (Only in Canada, ay.) Over and Out ...


COMPLETE THREAD

index on fields in another tables Posted by libbybil @ 4/21/2003 5:50:39 PM
RE: index on fields in another tables Posted by Steven Black @ 4/21/2003 7:12:06 PM
RE: index on fields in another tables Posted by Pete Sass @ 4/23/2003 1:45:57 PM
RE: index on fields in another tables Posted by Rene Relucio @ 4/25/2003 12:54:13 PM