Форум OlegON > Программы и оборудование для автоматизации торговли > Системы автоматизации торговли > Супермаг Плюс (Супермаг 2000)

Перенос таблиц почтовика с глаз долой : Супермаг Плюс (Супермаг 2000)

19.04.2024 23:29


22.05.2012 17:52
OlegON
 
Поскольку почтовик - известный дрючер, решил его выгнать из кеша и сослать с диска данных... Обращаю внимание, что это тест, а не рекомендация.

Код:
create tablespace posttables datafile '/mnt/stripe1/post.dbf' size 5G;

alter tablespace posttables nologging;

alter user supermag quota unlimited on posttables;

begin
  for c in (select table_name from all_tables where table_name like 'SMPOST%' and owner='SUPERMAG' and temporary='N')
  Loop
    begin
      execute immediate
              'alter table supermag.' || c.table_name || ' move tablespace posttables';
    end;
  end loop;
end;

begin
  for c in (select index_name from all_indexes where table_name like 'SMPOST%' and owner='SUPERMAG' and temporary='N')
  Loop
    begin
      execute immediate
              'alter index supermag.' || c.index_name || ' rebuild tablespace posttables';
    end;
  end loop;
end;

begin
  for c in (select table_name from all_tables where table_name like 'SMPOST%' and owner='SUPERMAG' and temporary='N')
  Loop
    begin
      execute immediate
              'alter table supermag.' || c.table_name || ' storage (buffer_pool recycle)';
    end;
  end loop;
end;

begin
  for c in (select index_name from all_indexes where table_name like 'SMPOST%' and owner='SUPERMAG' and temporary='N')
  Loop
    begin
      execute immediate
              'alter index supermag.' || c.index_name || ' storage (buffer_pool recycle)';
    end;
  end loop;
end;
Часовой пояс GMT +3, время: 23:29.

Форум на базе vBulletin®
Copyright © Jelsoft Enterprises Ltd.
В случае заимствования информации гипертекстовая индексируемая ссылка на Форум обязательна.