On which columns you should create Indexes?

1 Answer

Answer :

In general, you should create an index on a column in any of the following situations:
▪ The column is queried frequently
▪ A referential integrity constraint exists on the column
▪ A UNIQUE key integrity constraint exists on the column
The following list gives guidelines in choosing columns to index:
▪ You should create indexes on columns that are used frequently in WHERE clauses
▪ Are used frequently to join tables
▪ Are used frequently in ORDER BY clauses
▪ On columns that have few of the same values or unique values in the table

Related questions

Description : A table is having few rows, should you create indexes on this table

Last Answer : Small tables do not require indexes; if a query is taking too long, then the table might have grown from small to large. You can create an index on any column; however, if the ... , creating an index on the column does not increase performance and the index takes up resources unnecessarily.

Description : How you will avoid your query from using indexes?

Last Answer : SELECT * FROM emp Where emp_no+' '=12345; i.e you have to concatenate the column name with space within codes in the where condition. SELECT /*+ FULL(a) */ ename, emp_no from emp where emp_no=1234; i.e using HINTS

Description : What is the use of INDEXES option in IMP command ?

Last Answer : A flag to indicate whether import should import index on tables or not.

Description : What is the use of INDEXES option in EXP command ?

Last Answer : A flag to indicate whether indexes on tables will be exported.

Description : Can you built indexes online?

Last Answer : YES. You can create and rebuild indexes online. This enables you to update base tables at the same time you are building or rebuilding indexes on that table. You can perform DML operations while the ... online index build operations: CREATE INDEX emp_name ON emp (mgr, emp1, emp2, emp3) ONLINE;

Description : When should you rebuilt indexes?

Last Answer : In 90% cases - NEVER. When the data in index is sparse (lots of holes in index, due to deletes or updates) and your query is usually range based. Also index blevel is one of the key indicators of performance of sql queries doing Index range scans.

Description : What type of indexes are available in Oracle?

Last Answer : There are many index types within Oracle: B*Tree Indexes - common indexes in Oracle. They are similar construct to a binary tree; they provide fast access by key, to an individual row or range of ... They allow data to be sorted from big to small (descending) instead of small to big (ascending).

Description : Consider the following two statements : (a) Data scrubling is a process to upgrade the quality of data, before it is moved into Data warehouse. (b) Data scrubling is a process of rejecting data from data warehouse to create ... true (C) Both (a) and (b) are false (D) Both (a) and (b) are true

Last Answer : (A) (a) is true, (b) is false

Description : How do you use the same lov for 2 columns

Last Answer : We can use the same lov for 2 columns by passing the return values in global values and using the global values in the code

Description : How many number of columns a record group can have?

Last Answer : A record group can have an unlimited number of columns of type CHAR, LONG, NUMBER, or DATE provided that the total number of column does not exceed 64K.

Description : Can a formula column referred to columns in higher group?

Last Answer : Yes

Description : How many types of columns are there and what are they

Last Answer : Formula columns :: For doing mathematical calculations and returning one value Summary Columns :: For doing summary calculations such as summations etc. Place holder Columns :: These columns are useful for storing the value in a variable

Description : How many columns can table have?

Last Answer : The number of columns in a table can range from 1 to 254.

Description : What is pseudo columns ? Name them?

Last Answer : A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values. This section describes these pseudocolumns: * CURRVAL * NEXTVAL * LEVEL * ROWID * ROWNUM

Description : Suppose a customer table is having different columns like customer no, payments.What will be the query to select top three max payments?

Last Answer : SELECT customer_no, payments from customer C1 WHERE 3

Description : How many LONG columns are allowed in a table ? Is it possible to use LONG columns in WHERE clause or ORDER BY ?

Last Answer : Only one LONG columns is allowed. It is not possible to use LONG column in WHERE or ORDER BY clause.

Description : Can a primary key contain more than one columns?

Last Answer : Yes

Description : If a break order is set on a column would it affect columns which are under the column?

Last Answer : No

Description : What are the types of calculated columns available?

Last Answer : Summary, Formula, Placeholder column.

Description : How are book indexes made?

Last Answer : answer:There are many options for generating an index. Paid software like Cindex for ~$500, services that do it for you for $100-200, or free software. You can download this free indexer PDF Index ... need to read through and make sure it gets what you want and reports only the important key words.

Description : Which grouping do you work with when formatting text in word? 1) Tables, paragraphs and indexes 2) Paragraphs, indexes and sections 3) Characters, sections and paragraphs 4) Indexes, characters and tables 5) None of these

Last Answer : Answer :1

Description : You organize files by storing them in a) Archives b) Folders c) Indexes d) Lists

Last Answer : b) Folders

Description : You organise files by storing them in a) Archives b) Folders c) Indexes d) Lists e) None of these

Last Answer : b) Folders

Description : The Journal first published in 1889, featured the Jones 'Average', the first of several indexes of stock and bond prices on the New York Stock Exchange. How do we know that today?

Last Answer : Answer: Wall Street Journal

Description : Data which improves the performance and accessibility of the database are called: (A) Indexes (B) User Data (C) Application Metadata (D) Data Dictionary

Last Answer : (A) Indexes

Description : How does one create a standby database? (for DBA)

Last Answer : While your production database is running, take an (image copy) backup and restore it on duplicate hardware. Note that an export will not work!!! On your standby database, issue ... the standby database, stop the recovery process and activate it: ALTER DATABASE ACTIVATE STANDBY DATABASE;

Description : Name a tablespace automatically created when you create a database.

Last Answer : The SYSTEM tablespace.

Description : What command would you use to create a backup control file?

Last Answer : Alter database backup control file to trace.

Description : A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?

Last Answer : Disable the foreign key constraint to the parent, drop the table, re- create the table, enable the foreign key constraint.

Description : Which parameter specified in the DEFAULT STORAGE clause of CREATE TABLESPACE cannot be altered after creating the tablespace?

Last Answer : All the default storage parameters defined for the tablespace can be changed using the ALTER TABLESPACE command. When objects are created their INITIAL and MINEXTENS values cannot be changed.

Description : How does one create and drop database users?

Last Answer : Look at these examples: CREATE USER scott IDENTIFIED BY tiger -- Assign password DEFAULT TABLESACE tools -- Assign space for table and index segments TEMPORARY TABLESPACE temp; -- Assign sort space ... give the user some space quota on its tablespaces: ALTER USER scott QUOTA UNLIMITED ON tools;

Description : What utility is used to create a physical backup?

Last Answer : Either rman or alter tablespace begin backup will do..

Description : The following describes means to create a OEM V1.x (very old!!!) repository on WindowsNT:

Last Answer : Create a tablespace that would hold the repository data. A size between 200- 250 MB would be ideal. Let us call it Dummy_Space. . Create an Oracle user who would own this repository. Assign ... would trigger the creation of the repository. From now on, Enterprise manager is ready to accept jobs.

Description : How does one create a repository? (for DBA

Last Answer : For OEM v2 and above, start the Oracle Enterprise Manager Configuration Assistant (emca on Unix) to create and configure the management server and repository. Remember to setup a backup for the repository database after creating it.

Description : What are the built-in routines is available in forms 4.0 to create and manipulate a parameter list?

Last Answer : Add_parameter Create_Parameter_list Delete_parameter Destroy_parameter_list Get_parameter_attr Get_parameter_list set_parameter_attr

Description : Can we create two blocks with the same name in form 3.0 ?

Last Answer : No

Description : How will you create multiple rollback segments in a database ?

Last Answer : Create a database which implicitly creates a SYSTEM Rollback Segment in a SYSTEM tablespace. Create a Second Rollback Segment name R0 in the SYSTEM tablespace. Make new rollback segment ... ) for rollback segments. Deactivate Rollback Segment R0 and activate the newly created rollback segments.

Description : How does one create a RMAN recovery catalog? (for DBA

Last Answer : Start by creating a database schema (usually called rman). Assign an appropriate tablespace to it and grant it the recovery_catalog_owner role. Look at this example: sqlplus sys SQL>create user ... . Look at this example: rman catalog rman/rman target backdba/backdba RMAN> register database;

Description : Why is it preferable to create a fewer no. of queries in the data model?

Last Answer : Because for each query, report has to open a separate cursor and has to rebind, execute and fetch data.

Description : How does one create a password file? (for DBA

Last Answer : The Oracle Password File ($ORACLE_HOME/dbs/orapw or orapwSID) stores passwords for users with administrative privileges. One needs to create a password files before remote administrators (like OEM) will be ... visible in the process table of many systems. Administrators needs to be aware of this!

Description : How do you create a new session while open a new form?

Last Answer : Using open_form built-in setting the session option Ex. Open_form('Stocks ',active,session). when invoke the mulitiple forms with open form and call_form in the same application, state whether the following are true/False

Description : How does one create a new database? (for DBA)

Last Answer : One can create and modify Oracle databases using the Oracle "dbca" (Database Configuration Assistant) utility. The dbca utility is located in the $ORACLE_HOME/bin directory. The Oracle Universal ... ='/u02/oradata/'; ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_2='/u03/oradata/'; CREATE DATABASE;

Description : A Column is having many repeated values which type of index you should create on this column, if you have to?

Last Answer : For example, assume there is a motor vehicle database with numerous low-cardinality columns such as car_color, car_make, car_model, and car_year. Each column contains less than 100 distinct values by themselves, and a b tree index would be fairly useless in a database of 20 million vehicles.

Description : Which default Database roles are created when you create a Database?

Last Answer : CONNECT , RESOURCE and DBA are three default roles. The DBA_ROLES data dictionary view can be used to list all roles of a database and the authentication used for each role. The following query lists all the roles in ... ------------ -------- CONNECT NO RESOURCE NO DBA NO SECURITY_ADMIN YES

Description : What is the minimum number of instances you need to have in order to create a RAC?

Last Answer : 1. You can create a RAC with just one server.

Description : How many color patterns can you create by reversing the colors of combinations of rows and columns from a checkerboard?

Last Answer : answer:OK @LostInParadise – I understand each word individually, but I don’t have a friggin clue what you are asking. Can you perhaps explain the question better for simpletons like me?

Description : What does "jumps off the screen" mean?

Last Answer : answer:AMD is a relatively small manufacturer but well established in the industry. In this context, AMD jumps off the screen at the guy doing the research into acquiring companies for ... chip manufacturing division, but AMD is the one that really stands out from an acquisition perspective.

Description : How to add conditions in select statement in oracle?

Last Answer : Just add the decode

Description : How can I dump an oracle schema to a LOCAL file over a network connection from sqlplus?

Last Answer : By connecting and spooling are you excluding the exp/imp commands (or expdb/impdb in 10g)?

Description : What are the two ways to incorporate images into a oracle forms application?

Last Answer : Boilerplate Images Image_items