![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I thought you could add multiple supplemental indexes with you butil or the GUI utility... Does this work or is there any utility that allows adding multiple supplemental indexes at one time! |
#3
| |||
| |||
|
|
You should be able to although there are certain "limits". I believe you can, but am not sure you would want to add more than one at a time. Sequentially should be fine, but more than one at a time would probably actually be slower. The Btrieve API call itself only allows the addition of one key at a time. For details see: http://www.pervasive.com/library/doc...PI8.html#34182 from the http://www.pervasive.com/library/ I am sure that like any other Btrieve API call you could make more than one at a time (multi-threaded using the "id" family of calls or separate processes), however adding a key to the data file requires quite a few heavy steps be performed for all but the most trivial of data sets, e.g. 1) extract the key segments from existing records, 2) sort the key segments (done in memory if there is enough free memory or is disk based sort if RAM is not available), 3) write all the new index pages into the data file. Step 1 requires reading every record in the file, step 2 sorts them and step 3 writes the new index information. Step 2 would quickly run out of memory if you made more than 1 call at a time forcing a disk based sort (slower) on all but the most trivial of data files. To try it out you should be able to launch multiple copies of butil or the maintenance utility and kick them all off at the same time. I believe that if the 2 or more sequential reads going at the same time will cause file IO thrashing where the disk head is seeking back and forth between the two sequential reads unless it all fits in RAM. Leonard On Thu, 15 Jul 2004 16:31:47 GMT, "Wendell Buckner" wendellbuckner (AT) sbcglobal (DOT) net> wrote: I thought you could add multiple supplemental indexes with you butil or the GUI utility... Does this work or is there any utility that allows adding multiple supplemental indexes at one time! |
#4
| |||
| |||
|
|
I thought you could add multiple supplemental indexes with you butil or the GUI utility... Does this work or is there any utility that allows adding multiple supplemental indexes at one time! |
#5
| |||
| |||
|
|
Thanks for your response! I'm more frustrated with the fact that the utilities BUTIL & MAINTENANCE can't read the key definitions (from a definition file) and apply them one after the other (doing multiple api calls)... this way I could put all the supplemental keys into one key definition file instead creating multiple definition files and having to run butil or the maintenance app N number of times to add N supplemental keys... You tool(s) look intereseting "Leonard" <lharvey (AT) austin (DOT) rr.com> wrote in message news:mclef0ps7e6io62460h3trlrvjjhmlots5 (AT) 4ax (DOT) com... You should be able to although there are certain "limits". I believe you can, but am not sure you would want to add more than one at a time. Sequentially should be fine, but more than one at a time would probably actually be slower. The Btrieve API call itself only allows the addition of one key at a time. For details see: http://www.pervasive.com/library/doc...PI8.html#34182 from the http://www.pervasive.com/library/ I am sure that like any other Btrieve API call you could make more than one at a time (multi-threaded using the "id" family of calls or separate processes), however adding a key to the data file requires quite a few heavy steps be performed for all but the most trivial of data sets, e.g. 1) extract the key segments from existing records, 2) sort the key segments (done in memory if there is enough free memory or is disk based sort if RAM is not available), 3) write all the new index pages into the data file. Step 1 requires reading every record in the file, step 2 sorts them and step 3 writes the new index information. Step 2 would quickly run out of memory if you made more than 1 call at a time forcing a disk based sort (slower) on all but the most trivial of data files. To try it out you should be able to launch multiple copies of butil or the maintenance utility and kick them all off at the same time. I believe that if the 2 or more sequential reads going at the same time will cause file IO thrashing where the disk head is seeking back and forth between the two sequential reads unless it all fits in RAM. Leonard On Thu, 15 Jul 2004 16:31:47 GMT, "Wendell Buckner" wendellbuckner (AT) sbcglobal (DOT) net> wrote: I thought you could add multiple supplemental indexes with you butil or the GUI utility... Does this work or is there any utility that allows adding multiple supplemental indexes at one time! |
#6
| |||
| |||
|
|
BUTIL *CAN* be used to add multiple keys simultaneously -- this is very handy for when adding keys takes a long time, and you don't want to wait around. BUTIL @commandFile This form of the BUTIL command will execute multiple commands (i.e. create index calls, even) in sequence. See the manuals for full details... BB Wendell Buckner wrote: Thanks for your response! I'm more frustrated with the fact that the utilities BUTIL & MAINTENANCE can't read the key definitions (from a definition file) and apply them one after the other (doing multiple api calls)... this way I could put all the supplemental keys into one key definition file instead creating multiple definition files and having to run butil or the maintenance app N number of times to add N supplemental keys... You tool(s) look intereseting "Leonard" <lharvey (AT) austin (DOT) rr.com> wrote in message news:mclef0ps7e6io62460h3trlrvjjhmlots5 (AT) 4ax (DOT) com... You should be able to although there are certain "limits". I believe you can, but am not sure you would want to add more than one at a time. Sequentially should be fine, but more than one at a time would probably actually be slower. The Btrieve API call itself only allows the addition of one key at a time. For details see: http://www.pervasive.com/library/doc...PI8.html#34182 from the http://www.pervasive.com/library/ I am sure that like any other Btrieve API call you could make more than one at a time (multi-threaded using the "id" family of calls or separate processes), however adding a key to the data file requires quite a few heavy steps be performed for all but the most trivial of data sets, e.g. 1) extract the key segments from existing records, 2) sort the key segments (done in memory if there is enough free memory or is disk based sort if RAM is not available), 3) write all the new index pages into the data file. Step 1 requires reading every record in the file, step 2 sorts them and step 3 writes the new index information. Step 2 would quickly run out of memory if you made more than 1 call at a time forcing a disk based sort (slower) on all but the most trivial of data files. To try it out you should be able to launch multiple copies of butil or the maintenance utility and kick them all off at the same time. I believe that if the 2 or more sequential reads going at the same time will cause file IO thrashing where the disk head is seeking back and forth between the two sequential reads unless it all fits in RAM. Leonard On Thu, 15 Jul 2004 16:31:47 GMT, "Wendell Buckner" wendellbuckner (AT) sbcglobal (DOT) net> wrote: I thought you could add multiple supplemental indexes with you butil or the GUI utility... Does this work or is there any utility that allows adding multiple supplemental indexes at one time! |
![]() |
| Thread Tools | |
| Display Modes | |
| |