%UpdateStats is not working or it is Ignored

PeopleSoft Application Engine replaces this meta-SQL construct with a platform-dependent SQL statement that updates the system catalog tables used by the database optimizer in choosing optimal query plans.
Peoplesoft intends that you use this construct after your
program has inserted large amounts of data into a temporary table that will be deleted before the end of the program run.

For databases that either execute an implicit commit for %UpdateStats or require a commit before and/or after this meta-SQL, PeopleSoft Application Engine skips %UpdateStats in the following circumstances:
• A commit is not allowed, as in within an Application Engine program called from
PeopleCode.
• The program issues a non-select SQL statement since the last commit occurred. In such a situation, data is likely to have changed.
• You are deferring commits in a select/fetch loop in a restartable program. PeopleSoft Application Engine skips %UpdateStats even if the previous condition is false.

 

1 comments:

  1. StarStraf said,

    NOTE - if you have a PEOPLECODE action as part of the SQL that is the %UpdateStats the stats will not update because a commit is needed.

    on July 30, 2014 at 12:30 PM