Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!motcsd!motsj1!mcdchg!att!cbnewse!curtin From: curtin@cbnewse.ATT.COM (C.S.Curtin) Newsgroups: comp.databases Subject: clipper internals Keywords: clipper dbase index Message-ID: <13221@cbnewse.ATT.COM> Date: 22 Feb 90 22:39:17 GMT Distribution: na Organization: AT&T Bell Laboratories, Naperville, IL. Lines: 60 this posting is for a friend without net access. I will forward e-mail and redirect flames > /dev/null. dBase/Clipper gurus I am doing an application that is having speed problems when many records are entered into the database. The time seek()ing records using the index do not seem to be linear. Sure with additional records the seek time should increase but the factor seems to be x**2. This generates several questions for the data base internals gurus to answer. Are there any good books on the internals of pc bases data bases? (mainly clipper/dbase) 1. How are the index files structured? The data base will have approximately 20,000 records and will have several indexes active at a time. currently the size of the index file is 250K bytes. How is the index internally accessed by clipper, since the index cannot be kept in core memory? Does it require clipper to access the index file on disk first? a. does anyone have any hints on increasing the speed of the index access? b. Does index key data type have that much to do with it? I am assuming that it just does a string compare between the requested key and the key in the index file. c. What does it cost to index on various data types (ie. string+int) or should all indexes be performed on just string "types" ? key 2. How is the skip command performed? What actually happens when a skip command is given? Does the file pointer just increment X bytes (whatever the width of the record) number of bytes, or is the record read into the buffer and flushed by clipper? It appears as though the record is read into the buffer and the file pointer not just incremented is it? lseek(dbf_fd, (num_skips)*sizeof(record), SEEK_CUR); or? while (num_skips--) read(dbf_fd, rec, sizeof(struct rec); Any assistance on these issues or others related to the internals of clipper/dbase would be appreciated. I am concerned about the speed of the data access and currently cannot see how a system with many records can be maintained using either of these databases.