Re: SLOW update statments
Posted in 1998
Also check what indexes are created on the table. Updates on indexes with highly-duplicate data are much slower. Try to create your indexes with a high degree of uniqueness; you may want to add a more unique column to the end of your index to achieve this. June Uwe Feuerstein wrote: > Hi Erik, > > For an update at first the db must find the relevant row(s). > Check how long an normal select takes. > Is an index used - try to insert a "set explain on" command before you > perform the select/update. This writes an "sqexplain.out" out file in > the current dirctory (unix) - you can see there if and which index is > used. > Mostly the problem occurs that the necessary data for the query > optimizer are not availible or too old. You should schedule an "update > statistics medium" job (i.e. once a week) to update this optimizer > informations. (more information you can find in the release notes or in > the Informix books) > > Hope this helps > Uwe > > Erik Nis Jessen wrote: > > > We have got a problem with some VERY slow update statements in an > > INFORMIX database. Configuration:WEB server accessing Informix DB > > through CGI using Visigenics ODBC drivers. Everything running on Sun > > Solaris stations. The table that we want to do the updates on has > > about 40000 rows.I am aware that this is not the optimal solution but > > that product needs to the very platform independent. The weird thing > > is that all other queries are fast. INSERT statements in this table > > takes less than 1 second, where an UPDATE on the same row can takes up > > to 13 seconds. None of the keys in the table are integer values; all > > strings, which might contribute to this problem. Does anyone have an > > ideas as to what is going on here. Thanks/Erik