Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 To: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 Tags
Subject: RE: Composed Index as primary key?
Thread ID: 268913 Message ID: 268935 # Views: 26 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Thursday, July 15, 2010 2:38:39 PM         
   


> > It is recently that I discovered composite indexes (very useful). I used to do LOCATE and SCAN REST etc...
> > VFP help file says:
> > "You can use BINTOC( ) to reduce the size of indexes for numeric fields containing integer data by passing a numeric eFlags..."
> > I just created this new table and would like to make it correctly from the start. Could you tell me what eFlag I should put in bintoc() ?
> > I read a bit about bintoc(), and want to have a closer look later. But in the meantime I'm ready to follow your or other experts advice without knowing too much about it.
>
> You need to first find out the range of values that the field can have. So if you have a N(3) field and you know that the value in the field will not exceed 100, you can use BINTOC(1) which will give you a small index. But if you think it may take the value of upto 500, you will have to go to the next step and use BINTOC(2)
>
> Regards
> Tushar

Hi Tushar
These are all integers, even semester which will have a maximum of 12 (should I change this? You told me once if there are not many fields [4 int + 3 memo in this file], I'll gain something in file size).
Subject_id should not exceed 200-300 unless users delete & rerecord often. student_id will follow the number of students in the school, I guess a max of 400 if I look at the building they have.
But you never know, schools expand etc.... What would you suggest that is safe?
As said, I don't know very much about bintoc() yet.
Thank you for reply.

Regards
Samir

ENTIRE THREAD

Composed Index as primary key? Posted by Samir H. @ 7/15/2010 11:26:26 AM
RE: Composed Index as primary key? Posted by Cetin Basoz @ 7/15/2010 12:34:34 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/15/2010 1:21:52 PM
RE: Composed Index as primary key? Posted by Cetin Basoz @ 7/15/2010 2:19:09 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/15/2010 2:40:10 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/15/2010 2:03:14 PM
RE: Composed Index as primary key? Posted by tushar @ 7/15/2010 2:16:13 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/15/2010 2:38:39 PM
RE: Composed Index as primary key? Posted by tushar @ 7/15/2010 3:44:03 PM
RE: Composed Index as primary key? Posted by Cetin Basoz @ 7/15/2010 2:35:00 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/15/2010 2:49:40 PM
RE: Composed Index as primary key? Posted by Cetin Basoz @ 7/15/2010 3:45:23 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/15/2010 4:01:37 PM
RE: Composed Index as primary key? Posted by Mike Yearwood @ 7/15/2010 8:21:47 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/16/2010 4:48:41 AM
RE: Composed Index as primary key? Posted by Mike Yearwood @ 7/16/2010 6:07:24 AM
RE: Composed Index as primary key? Posted by Samir H. @ 7/16/2010 6:16:14 AM
RE: Composed Index as primary key? Posted by Cetin Basoz @ 7/16/2010 1:12:42 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/16/2010 1:23:51 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/16/2010 1:46:54 PM
RE: Composed Index as primary key? Posted by tushar @ 7/15/2010 4:02:29 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/15/2010 4:12:41 PM
RE: Composed Index as primary key? Posted by Anders Altberg @ 7/16/2010 1:20:32 PM
RE: Composed Index as primary key? Posted by Samir H. @ 7/16/2010 1:31:56 PM