Thank you for the information, Wally! :) Again, though, I'm on the hunt -- I like having references for my forgetful mind. Is there a piece of UniData documentation or online help that describes the ONLINE keyword in relation to BUILD.INDEX? It doesn't seem to show when I do a HELP BUILD.INDEX.
On 2/7/07, Wally Terhune <[EMAIL PROTECTED]> wrote:
I don't agree with Shaun's analysis of UniData and indexes - though perhaps we are looking at it slightly differently. 1) CREATE.INDEX just creates the index file and puts a flag in the source file header indicating that indexes exist - and how many. The details about the specific fields and their 'formula' (D type = attribute, I type = expression) are stored in the header of the index file by the CREATE.INDEX command. There are no locking or file open issues regarding CREATE.INDEX that I am aware of. You can run LIST.INDEX before you BUILD.INDEX and confirm that you got what you asked for. 2) BUILD.INDEX (prior to UniData release 7.1) requires exclusive access to the primary file during the build process. This is to ensure that when the build is done, the contents of the index are 100% consistent with the contents of the primary file. This is done with UniData internal locks (exclusive lock on the entire file for updates - the file can still be listed during BUILD.INDEX, but not updated). For Recoverable files (RFS), no udt process can have the file OPEN. If BUILD.INDEX cannot get an exclusive lock (or for RFS files - other processes have it open), BUILD.INDEX will fail - producing an error message. LIST.INDEX can be used to confirm the 'built' status of your indexes. 3) At release 7.1.0, we added the ONLINE keyword to the BUILD.INDEX command. This changes the underlying build operations considerably, but allows you to continue to write records to the primary file during BUILD.INDEX. When you use the ONLINE keyword, the build is significantly slower - but your 7/24 application use can continue unimpeded. Wally Terhune U2 Support Architect IBM Information Management 4700 South Syracuse Street, Denver, CO 80237 Tel: 303.773.7969 Fax: 303.773.5915 [EMAIL PROTECTED] <[EMAIL PROTECTED] erguson.com> Sent by: To [EMAIL PROTECTED] <u2-users@listserver.u2ug.org> stserver.u2ug.org cc Subject 02/07/2007 11:19 [U2] Index Rebuilding AM Please respond to [EMAIL PROTECTED] er.u2ug.org I'm on digest, so sorry for the delay. Indexes on UniVerse and UniData are different. UniVerse will stop you from creating them if the file is open by any process (very good!). UniData will go on it's merry way and create the index even if the file is open by another process. You run the BUILD.INDEX command and all looks fine. Then you add more records to the file and the index appears broken. Your new records are not accounted for. On UniData, you must be absolutely sure that the file is not open when you create the index. On unix, I use "fuser -u [path to file]". I do not know the equivalent on Window$. Indexes have become very stable and accurate if created properly. As mentioned earlier, best not to use "I" or "V" dictionary items, if possible (especially TRANS or file OCONV's), and better to use the key and null in a boolean expression (using NO.NULLS at creation) instead of a "1" and "0". Just my 2 cents... Shaun ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ [demime 1.01d removed an attachment of type image/gif which had a name of graycol.gif] [demime 1.01d removed an attachment of type image/gif which had a name of pic23157.gif] [demime 1.01d removed an attachment of type image/gif which had a name of ecblank.gif] ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/