Re: onKeyPress()
- Posted by Robert Craig <rds at RapidEuphoria.com> Aug 06, 2001
- 461 views
George Walters writes: > I read from Rob's response that changing > tables does in fact scan the entire file > pulling 4 bites from each record... EDS does not scan the entire file, or even the entire table. If your table has 1000 records (of any size), db_select_table() will read in 1000 pointers to those records on disk. This is 4000 bytes of data split into a number of contiguous blocks. EDS tries to maintain, very roughly, sqrt(number of records) pointers per block, e.g. roughly 32 blocks of 32 pointers (128 bytes) per block, but it can vary a lot, depending on deletions etc. EDS seeks directly to the start of each block and starts reading it. There is no "scanning" or searching of the file. I doubt that this is going to slow you down enough for the user of your program to notice. It might be a problem if you are doing a massive operation over the whole database, selecting tables millions of times. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com