Re: Running 4GL on table that changes a lot
Posted in 2005
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 > Is this a logged data base? Are you beginning work and committing work after X transactions (say, every 1,000 or so)? Inserting with a cursor instead of just doing "insert?" Along with other suggestions about updating statistics, might not hurt (if it's logged).