Re: [U2] Auto-updating of secondary indices.
I am on Jbase now, and it refuses to build an index on any I-descriptor, so I can't test this. So, I'll take your word for it and file this under You learn something new every day. Thanks, Charlie On 5/18/2009 10:27 AM, Scott Ballinger wrote: On Sun, May 17, 2009 at 7:30 PM, Charlie Noah cwn...@comcast.net wrote: Considering the nature of secondary indexes, and not just Universe, you should never count on an index built on a subroutine to be updated automatically. If Universe does this, it must be magic. ;-) The same goes for any dictionary definition that returns content from another file Charlie, I see the winkie, but still... It is perfectly appropriate to build indexes using I-descriptors and expect them to be updated automatically, e.g. to consistently format a name field for indexing, or to create compound keys, etc. Using I-descriptors (whether or not with SUBR calls) works perfectly and, in my experience, is no more error-prone than indexes on native fields. The fact that U2 secondary indexes are maintained automatically is the whole point: the system does that work for you. I agree that using SUBR or TRANS to utilize data from another file as part of the index is problematic. However, in that case the appropriate index scheme would be to maintain a separate inverted-key type file and maintain said file via a trigger. Frankly, it is a poor design that uses native U2 secondary indexes that need to be rebuilt each night. /Scott Ballinger Pareto Corporation Edmonds WA USA 206 713 6006 --- 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/
RE: [U2] Auto-updating of secondary indices.
Just to be 100% clear - it's not just indexes on subroutines that will get out of sync. Even indexing a simple TRANS statements will cause problems. This is because the index is updated whenever the primary file (the one with the index) is updated. If the data is in the 2nd file (the TRANS or where the subroutine gets its data), the primary file has no clue that the data was changed in the secondary file, thus the index will not be updated. The only time indexing something like this is (relatively) safe is if you know the data in the 2nd file will never change, and even those can burn you. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 -Original Message- From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Womack, Adrian Sent: Sunday, May 17, 2009 11:57 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Auto-updating of secondary indices. Use LIST.INDEX filename and check under the Build column, indexes usually say Not Reqd if they are updated automatically. The DISABLE.INDEX ENABLE.INDEX commands can be used to turn off/on automatic updating of the indexes. But, as Henry mentioned, if the subroutines are accessing data in other files, then automatic updating is not really a good idea because as soon as the other file changes your AK will be out of date (even with automatic updates on). IMO Aks should only ever reference @ID @RECORD. -Original Message- From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Ken Ford Sent: Monday, 18 May 2009 10:15 AM To: u2-users@listserver.u2ug.org Subject: [U2] Auto-updating of secondary indices. From my reading of the Universe documentation, secondary indices should be automatically updated. I have a case where a file has about 8 secondary indices, some of which are updated automatically, and some seem not to be. A complete rebuild is done on all these indices each night. There does not seem to be anything significantly different about the ones that don't update automatically. They are I-descriptors that call a subroutine, but others like these update automatically. Any suggestions? I am thinking I should delete the indices in question, recreate them, and rebuild them. Regards, Ken Ford Universe Software Engineer DISCLAIMER: Disclaimer. This e-mail is private and confidential. If you are not the intended recipient, please advise us by return e-mail immediately, and delete the e-mail and any attachments without using or disclosing the contents in any way. The views expressed in this e-mail are those of the author, and do not represent those of this company unless this is clearly indicated. You should scan this e-mail and any attachments for viruses. This company accepts no liability for any direct or indirect damage or loss resulting from the use of any attachments to this e-mail. --- 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/
Re: [U2] Auto-updating of secondary indices.
On Sun, May 17, 2009 at 7:30 PM, Charlie Noah cwn...@comcast.net wrote: Considering the nature of secondary indexes, and not just Universe, you should never count on an index built on a subroutine to be updated automatically. If Universe does this, it must be magic. ;-) The same goes for any dictionary definition that returns content from another file Charlie, I see the winkie, but still... It is perfectly appropriate to build indexes using I-descriptors and expect them to be updated automatically, e.g. to consistently format a name field for indexing, or to create compound keys, etc. Using I-descriptors (whether or not with SUBR calls) works perfectly and, in my experience, is no more error-prone than indexes on native fields. The fact that U2 secondary indexes are maintained automatically is the whole point: the system does that work for you. I agree that using SUBR or TRANS to utilize data from another file as part of the index is problematic. However, in that case the appropriate index scheme would be to maintain a separate inverted-key type file and maintain said file via a trigger. Frankly, it is a poor design that uses native U2 secondary indexes that need to be rebuilt each night. /Scott Ballinger Pareto Corporation Edmonds WA USA 206 713 6006 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Auto-updating of secondary indices.
Do the subroutines do anything that have temporal dependencies? That is, are the values dependent on anything other than @ID and @RECORD, such as an external value coming from somewhere? _ From: Ken Ford [mailto:ken.f...@firstmac.com.au] To: u2-users@listserver.u2ug.org [mailto:u2-us...@listserver.u2ug.org] Sent: Sun, 17 May 2009 19:15:20 -0700 Subject: [U2] Auto-updating of secondary indices. From my reading of the Universe documentation, secondary indices should be automatically updated. I have a case where a file has about 8 secondary indices, some of which are updated automatically, and some seem not to be. A complete rebuild is done on all these indices each night. There does not seem to be anything significantly different about the ones that don't update automatically. They are I-descriptors that call a subroutine, but others like these update automatically. Any suggestions? I am thinking I should delete the indices in question, recreate them, and rebuild them. Regards, Ken Ford Universe Software Engineer [cid:image001.gif@01C9D7B2.503A0520]http://www.firstmac.com.au/ Phone: (07) 3013 8686 Email: ken.f...@firstmac.com.aumailto:mark.b...@firstmac.com.au Web: www.firstmac.com.auhttp://www.firstmac.com.au/ ### ## This email (inc all attachments) is for the use of the intended recipient(s) only. Privileged or confidential information may be contained in this communication. If you have received this email in error, please notify the sender immediately and then delete all copies of this message from your computer network. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this email without the author's prior permission. If you are the intended recipient and you do not wish to receive similar electronic messages from us in future, then please respond to the sender to this effect. We have taken precautions to minimise the risk of transmitting software viruses, but advise you to carry out your own virus checks on this email and its attachments. We do not accept liability for any loss or damage caused by software viruses and do not represent that this transmission is free from viruses or other defects. FirstMac Limited (ABN 59 094 145 963) (AFSL 290600) ### ## [demime 1.01d removed an attachment of type image/gif which had a name of image001.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/
RE: [U2] Auto-updating of secondary indices.
Use LIST.INDEX filename and check under the Build column, indexes usually say Not Reqd if they are updated automatically. The DISABLE.INDEX ENABLE.INDEX commands can be used to turn off/on automatic updating of the indexes. But, as Henry mentioned, if the subroutines are accessing data in other files, then automatic updating is not really a good idea because as soon as the other file changes your AK will be out of date (even with automatic updates on). IMO Aks should only ever reference @ID @RECORD. -Original Message- From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Ken Ford Sent: Monday, 18 May 2009 10:15 AM To: u2-users@listserver.u2ug.org Subject: [U2] Auto-updating of secondary indices. From my reading of the Universe documentation, secondary indices should be automatically updated. I have a case where a file has about 8 secondary indices, some of which are updated automatically, and some seem not to be. A complete rebuild is done on all these indices each night. There does not seem to be anything significantly different about the ones that don't update automatically. They are I-descriptors that call a subroutine, but others like these update automatically. Any suggestions? I am thinking I should delete the indices in question, recreate them, and rebuild them. Regards, Ken Ford Universe Software Engineer DISCLAIMER: Disclaimer. This e-mail is private and confidential. If you are not the intended recipient, please advise us by return e-mail immediately, and delete the e-mail and any attachments without using or disclosing the contents in any way. The views expressed in this e-mail are those of the author, and do not represent those of this company unless this is clearly indicated. You should scan this e-mail and any attachments for viruses. This company accepts no liability for any direct or indirect damage or loss resulting from the use of any attachments to this e-mail. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Auto-updating of secondary indices.
I think I have now grasped it! Thank you all who responded. Obviously, any I-descriptors in a file that refer to other files will not be re-evaluated to automatically update a secondary index when one of those other files is updated, unless the parent file (of the I-descriptors) is itself updated. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/