Re: insert has high cost
Posted in 1997
Joseph Cullipher wrote: > > I was just reviewing some of my programs to ensure the queries were still > using the proper indexes. One thing that I did notice was that in my > sqexplain.out file most but not all of my insert statements had a high > cost ranging from 1273 to well over 9000 but my update statements on > those same rows only had a cost of 2 to 5. This was done on a machine > which I was the only one on. The program slows consiterably on these > statements. I'm using SE 7.1 and 4GL 6.00. Does anyone have any ideas > on why the cost of these inserts are now so high? I run update statistics > daily. Thanks. > IF your tables are heavily indexed, then performance suffers when you do inserts. Remember while inserting, you're adding new key data to your index records. If you're updating, and the columns changed are not key columns, then your costs should be lower. Best regards, Nigel -- +--------------------------------------------------------------------+ | Name : Edmund Nigel Gall Address: 9A Stanmore Avenue | | Title : Account Executive Port of Spain | | Company : Stratis Caribbean Ltd. Trinidad & Tobago, W.I. | | | | Contact Information: | | Office Personal | | Voice : (809) 623 6530/1 (809) 662 6611 | | Fax : (809) 623 8370 (809) 662 6611 | | Email : ngall@stratis-caribbean.com nigelg@trinidad.net | +----------------- http://www.stratis-caribbean.com -----------------+