[personal profile] zinal
RUNSTATS ON TABLE SchemaName.TableName 
  WITH DISTRIBUTION ON KEY COLUMNS 
  AND SAMPLED DETAILED INDEXES ALL;

А еще вот кусок кода для отключения статистических профилей в базе, создаваемой 1С:

db2 -td@ <<EOF
BEGIN
  FOR v_row AS (SELECT tabschema, tabname FROM syscat.tables
      WHERE tabname LIKE 'V8%'
          AND statistics_profile IS NOT NULL)
  DO
      CALL admin_cmd('RUNSTATS ON TABLE "'
          || v_row.tabschema || '"."'
          || v_row.tabname || '" UNSET PROFILE');
  END FOR;
END @
EOF

Profile

zinal: (Default)
Maksim Zinal

April 2017

M T W T F S S
     12
3456 789
10111213141516
17181920212223
24252627282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 25th, 2017 09:53 am
Powered by Dreamwidth Studios