Re: Running 4GL on table that changes a lot
Posted in 2005
We had a similar problem and did as Malcolm suggested - ie at a particular point UPDATE STATS on the table(s) concerned (we also used cursors with REOPTIMIZATION - such as: > IF l_reoptimize THEN > OPEN c_lock_carpool USING m_carpool.supplierRecNo, > m_carpool.vendorUniqueID > WITH REOPTIMIZATION > ELSE > OPEN c_lock_carpool USING m_carpool.supplierRecNo, > m_carpool.vendorUniqueID > END IF To access tables that may have had thousands of rows added (where a cursor was declared at the start of the prog) ) Dirk Moolman wrote: > I think this is in the CDI archives, but I haven't found it yet. If > memory serves me right, it was discussed on this list some years ago. > > Some of our programs run batch processes, dropping & creating tables, > and then inserting lots of records into them ... BUT, and this is my > problem, the program also reads from the tables being inserted into. > > Because these tables are recreated, no (update) statistics exist on > them. But I also can't create them, run update stats and then read from > them - the reading and inserting happens at the same time. > > How do I overcome this problem ? Hope my question is clear enough. > > Dirk > > > IDS7.31FD3 > Solaris 9 > > > > > > Dirk Moolman > Database and Unix Administrator > MXGROUP > > > > "People demand freedom of speech as a compensation for the freedom of > thought which they seldom use." > > > sending to informix-list