Download presentation
Presentation is loading. Please wait.
Published byLillian Crawshaw Modified over 10 years ago
1
SQL/PL SQL Oracle By Rana Umer
2
Performance Tuning Indexes ROWID View Sequences Oracle By Rana Umer
3
Performance Tuning Oracle By Rana Umer Indexing a table is an access strategy, that is a way to sort and search records in the table. Indexes are essential to improve the speed with which records can be located and retrieved from a table. An index is an ordered list of the contents of column or columns of a table. When index is created, it is assigned a ROWID for each row before it sorts.( Data Value in the index ) Records in the index are sorted in the ascending order of the index column.
4
Performance Tuning Oracle By Rana Umer Create Index On ( ) Select ROWID, Column-Name from Tabke-Name; Create Unique Index On ( ) Create Index On ( Reverse Alter INDEX ReBuild NOREVERSE; Drop index Alter Table index
5
Performance Tuning Oracle By Rana Umer ROWID Take Space in Table Data Dictionary In Bytes AAAHeeAABAAAMWCAAA Data Object Number AAAHee Datafile Number AAB Data Block AAAMWC Row Number AAA
6
View Oracle By Rana Umer Use the CREATE VIEW statement to define a view, which is a logical table based on one or more tables or views. A view contains no data itself. The tables upon which a view is based are called base tables. Create VIEW AS Select * from Table; Insert into VIEW Values (Values, Values …) Delete From ViewName where Name =Ali; Update ViewName Set column=values Where condition
7
Sequences Oracle By Rana Umer The Oracle SEQUENCE function allows you to create auto-numbering fields by using sequences. An Oracle sequence is an object that is used to generate incrementing or decrementing numbers. CREATE SEQUENCE MINVALUE value MAXVALUE value START WITH value INCREMENT BY value CACHE value;
8
Sequences Oracle By Rana Umer CREATE SEQUENCE user_seq MINVALUE 1 MAXVALUE 20000 START WITH 1 INCREMENT BY 1 CACHE 100; Drop Sequence Alter Sequence Maxvalue=50000; Insert into TableName Valuse ( user_seq, Ali,MCS,Evening);
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.