473,396 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How Indexes improve performance?

Hi,

Can you please explain me how indexes improve performance?
And where to use which index?

A link will also be useful for me.

Thanks,
Dilip
Jun 19 '07 #1
3 6531
debasisdas
8,127 Expert 4TB
An index creates an entry for each value that appears in the indexed columns. By default, Oracle creates B-tree indexes.


The syntax for creating a index is:

CREATE [UNIQUE] INDEX index_name
ON table_name (column1, column2, . column_n)
[ COMPUTE STATISTICS ];

UNIQUE indicates that the combination of values in the indexed columns must be unique.

COMPUTE STATISTICS tells Oracle to collect statistics during the creation of the index. The statistics are then used by the optimizer to choose a "plan of execution" when SQL statements are executed.

We could also choose to collect statistics upon creation of the index as follows:

Expand|Select|Wrap|Line Numbers
  1. CREATE INDEX emp_namesal_ind ON emp (ename, sal) COMPUTE STATISTICS;
Jun 19 '07 #2
debasisdas
8,127 Expert 4TB
You can also follow this link for further details.
Jun 19 '07 #3
Thank you very much.
You can also follow this link for further details.
Jun 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Subrahmanyam Arya | last post by:
Dear oracle gurus, I have created a non partitioned table with no indexes and stuffed in about 15 million rows. Using oracle 8.1.7.4 standard. I then deleted 1 million and it took 1 solid hour....
2
by: Chris | last post by:
Any help would be appreciated. I am running a script that does the following in succession. 1-Drop existing database and create new database 2-Defines tables, stored procedures and functions...
1
by: Geda | last post by:
Hi, I'm a newbie in this SQL Server development. I have a database with 7 tables that are linked to each other and have created clustered index for the primary keys and non-clustered index for...
1
by: Steve_CA | last post by:
Hi, The more I read, the more confused I'm getting ! (no wonder they say ignorance is bliss) I just got back from the bookstore and was flipping through some SQL Server Administration...
9
by: pheonix1t | last post by:
hello, I've been assigned to do performance tuning on an SQL2000 database (around 10GB in size, several instances). So far, I see a single RAID5 array, 4CPU (xeon 700MHZ), 4GB RAM. I see the...
16
by: romicva | last post by:
I've recently upgraded from 8.1.4 to 8.2.3. System slowed down noticably. Explain shows that indexes are not used. I did reorgs on indexes and tables, collected stats on key fields with detail...
2
by: rAinDeEr | last post by:
Hi, I have a table with the following definition. The primary key is west_nme and west_eff_tms and i have created unique index on them. The foreign keys which reference other parent tables are...
17
by: boa | last post by:
I'm currently planning disk layouts and use for a new version of our database. The current version has all data and indexes in the default filegroup, placed on one big raid-5 array(6 drives) along...
0
by: Thiru | last post by:
Before rebuilding the indexes, you may need to analyze the indexes and look at the dictionary (ie dba_indexes,index_stats ) for clustering factor,blevel(ie binary height) ,leaf nodes,deleted keys...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.