powered by simpleCommunicator - 2.0.59     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / Ошибки при сборе статистики в DB2.
3 сообщений из 3, страница 1 из 1
Ошибки при сборе статистики в DB2.
    #38325846
Guzya
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
db2 9.7.4

Провожу ежевечернее обслуживание по реорганизации и сбору статистике и на некоторых таблицах получаю сообщение об ошибке.


RUNSTATS ON TABLE CS.KORRLOG ON ALL COLUMNS ALLOW READ ACCESS

SQL2314W Некоторые из статистик находятся в несовместимом состоянии. Вновь собранные статистики для "TABLE" несовместимы с существующими статистиками для "INDEX". SQLSTATE=01650


Что с этим делать?
...
Рейтинг: 0 / 0
Ошибки при сборе статистики в DB2.
    #38325863
Mark Barinstein
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
GuzyaRUNSTATS ON TABLE CS.KORRLOG ON ALL COLUMNS ALLOW READ ACCESS

SQL2314W Некоторые из статистик находятся в несовместимом состоянии. Вновь собранные статистики для "TABLE" несовместимы с существующими статистиками для "INDEX". SQLSTATE=01650


Что с этим делать?
db2 ? SQL2314D:\>db2 ? SQL2314W


SQL2314W Some statistics are in an inconsistent state. The newly
collected "<object1>" statistics are inconsistent with the
existing "<object2>" statistics.

Explanation:

The query optimizer uses statistics to determine the best access plan
for a query. When inconsistent statistics are present, the optimizer
performs access plan evaluation with information that is less accurate
then if a consistent set of statistics was available. This might result
in an access plan that is not optimal.

Possible causes of this warning include the following.

1. Issuing RUNSTATS on the table only may result in a situation where
the table level statistics are inconsistent with the already existing
index level statistics. Likewise, issuing RUNSTATS for indexes only
or during index creation may leave table level statistics in an
inconsistent state. For example, if index level statistics are
collected on a particular table and later a significant number of
rows is deleted from this table, issuing RUNSTATS on the table only
may end up with the table cardinality less than FIRSTKEYCARD which is
an inconsistent state.
2. If a RUNSTATS is issued with the ALLOW WRITE ACCESS option when many
inserts, updates, or deletes are occurring concurrently, then
inconsistencies may occur because of table changes between the time
that table and index statistics are collected.
3. If a RUNSTATS is issued with the TABLESAMPLE option, then an
excessively low sample size may cause statistics to be inaccurately
extrapolated, resulting in inconsistencies. The chance of inaccurate
extrapolation is higher for SYSTEM sampling than for BERNOULLI
sampling.

User response:

Address the cause of the inconsistency and then collect statistics again
to resolve the inconsistency.

1. Issue a RUNSTATS to collect both table level and index level
statistics.
2. Collect statistics when inserts, updates, and deletes are minimal or
not occurring at all. Or, if concurrent inserts, updates, and deletes
are not essential, issue a RUNSTATS with the ALLOW READ ACCESS
option.
3. Increase the sample size, or, if RUNSTATS was issued with TABLESAMPLE
SYSTEM, use the TABLESAMPLE BERNOULLI option instead.

sqlcode: 2314

sqlstate: 01650
...
Рейтинг: 0 / 0
Ошибки при сборе статистики в DB2.
    #38326810
Guzya
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Спасибо.
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / Ошибки при сборе статистики в DB2.
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]