Increase query statistics for Oracle Databases (2)

Source: Internet
Author: User

1. Set the SQL statement for the five rollback segments as follows:
  
SELECT segment_name from Dba_rollback_segs WHERE initial_extent < 512000 and
Uppper (OWNER) = ' public ';
SELECT UPPER (STATUS) from Dba_rollback_segs WHERE UPPER (segment_name) = '
  
ALTER ROLLBACK SEGMENT RB1 OFFLINE;
ALTER ROLLBACK SEGMENT RB2 OFFLINE;
ALTER ROLLBACK SEGMENT RB3 OFFLINE;
ALTER ROLLBACK SEGMENT RB4 OFFLINE;
ALTER ROLLBACK SEGMENT RB5 OFFLINE;
  
DROP ROLLBACK SEGMENT RB1;
DROP ROLLBACK SEGMENT RB2;
DROP ROLLBACK SEGMENT RB3;
DROP ROLLBACK SEGMENT RB4;
DROP ROLLBACK SEGMENT RB5;
  
CREATE public ROLLBACK SEGMENT RB1 tablespace rollback_data
STORAGE (INITIAL 512000 NEXT 512000 maxextents 121);
CREATE public ROLLBACK SEGMENT RB2 tablespace rollback_data
STORAGE (INITIAL 512000 NEXT 512000 maxextents 121);
CREATE public ROLLBACK SEGMENT RB3 tablespace rollback_data
STORAGE (INITIAL 512000 NEXT 512000 maxextents 121);
CREATE public ROLLBACK SEGMENT RB4 tablespace rollback_data
STORAGE (INITIAL 512000 NEXT 512000 maxextents 121);
CREATE public ROLLBACK SEGMENT RB5 tablespace rollback_data
STORAGE (INITIAL 512000 NEXT 512000 maxextents 121);
  
ALTER ROLLBACK SEGMENT RB1 ONLINE;
ALTER ROLLBACK SEGMENT RB2 ONLINE;
ALTER ROLLBACK SEGMENT RB3 ONLINE;
ALTER ROLLBACK SEGMENT RB4 ONLINE;
ALTER ROLLBACK SEGMENT RB5 ONLINE;
  
COMMIT;

2. The following SQL statements are placed in a cluster of inventory tables with large amounts of data:
  
kcb= ' CREATE TABLE QC_KCB ('
+ ' CKNM number (8), '
+ ' QCNM number (10), '
+ ' CKKC number (12,2), '
+ ' SNCKKC number (12,2), '
+ ' LDJ number (12,2), '
+ ' BZ VARCHAR (100), '
+ ' PRIMARY KEY (CKNM,QCNM)] '
+ ' tablespace wxgl_data1 '; (large amount of inventory table etc put in wxgl_data1)
QCFL = ' CREATE TABLE QC_QCFL '
+ ' (flbh number (2) PRIMARY KEY, '
+ ' FLMC VARCHAR (20) '
+ ' ) '
+ ' tablespace wxgl_data2 ';(other table placed in Wxgl_data2)



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.