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. What do you mean "on the same rows?". Can you give an example w/the corresponding sqexplain.out? Are the statements prepared? I have just finished preparing 10 inserts of the form: "insert into tbl1 select * from tbl2 where key_field=?;" into 1 multi-statement prepare (and 10 deletes into one right after it), and they seem to work pretty quickly (after they're prepared that is). Douglas Wilson