如何在大表上建索引

 1 alter session set work_policy = manual
2 alter session set sort_area_size=1024M
3 paralell 2 or 4
4 nologging
5 compute statistics
6 check your TEMP tablespace

sql>create unique index index_name on tablename(column) online nologging parallel 2 compute statistics;

做完后要记得将并行取消

SQL>alter index index_name noparallel;

你可能感兴趣的:(session,parallel,statistics)