In article <6qulm4$isu$1@nnrp1.dejanews.com>, eglinsky@my-dejanews.com ()
wrote:
> Sometimes, when I'm trying to execute a stored procedure, I'm getting
> the
> following error message:
> -211 Cannot read system catalog catalog-table.
>
> After a while, seems like the row is un-locked and I can execute the
> Stored
> Procedure properly.
>
> I heard something about the SET LOCK MODE TO WAIT method, what is it
> good for?
> And what about the SYSPROCPLAN? How do I avoid the automatic
> re-optimizing?
>
You are right it is a locking problem. When Informix decides the
sysprocplan for the procedure is out of date due to table changes etc it
will re-generate the plan and hold a lock on the table for duration of the
transaction that the rebuild is in. By ensuring that you update
statistics on the procedures regularly you should have any problems.
Another way is put the update statistics command at the end of all you SPL
code so that when the SPL is built the procplan will be built.
There are a number of update statistics scripts available at www.iiug.org
if you don't like any of them let me know and I'll send a copy of mine.
Paul Watson # I don't suffer from
WF Software Ltd. # stress, I'm just
Tel. (+44) 1436 674729 # a carrier
Fax. (+44) 1436 678693 #