Re: Update Statistics and lock modes
Posted in 2000
keith.ponnapalli@verizon.com wrote:
>
> Hello,
>
> I am trying to run update statistics on a table with several indexes (including composite indexes) as recomended by Informix. (ie: High mode for head column and low for (col1,col2,..)). I am running these from a shell script and each statement in the background as stated below. Since Update statistics lock system catalogs, some of my Update statistics statements are failing due to locks.
>
> To prevent failures due to locks, can I do the following ?
>
> echo "set lock mode to wait ; upd stats statement 1..." | dbaccess ...... &
> ........
> echo "set lock mode to wait ; upd stats statement 10..." | dbaccess ...... &
Yes, that is the preferred method. Although I'd be careful not to run
too many concurrently.
> DEADLOCK_TIMEOUT is set to 60 and tables have over 100 million records.
Although this has nothing to do with local locks! It specifies the
timeout for remote locks, which are then deemed to be deadlocked. Local
locks in deadlock are rolled back immediately...., well, one of them is.
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
| http://www.informix.com http://www.informixhandbook.com |///// / //|
| http://www.iiug.org +-----------------------------------+//// / ///|
| |This email will self-destruct in |/// / ////|
| |10 sec. If you received this email |// / /////|
| |in error, sorry about the mess. |/ ////////|
+----------------------+-----------------------------------+-----------+