Chapter 6: Chapter 6: Creating And Managing Indexes Using Proc SQL

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Moxleyv
M
Moxleyv
Community Contributor
Quizzes Created: 38 | Total Attempts: 21,991
| Attempts: 105 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. Which keyword must you add to your index definition in the CREATE INDEX statement to ensure that no duplicate values of the key column can exist?

Explanation

To create a unique index, the UNIQUE keyword is added to the CREATE INDEX statement, between the keywords CREATE and INDEX.

Submit
Please wait...
About This Quiz
Chapter 6: Chapter 6: Creating And Managing Indexes Using Proc SQL - Quiz

This quiz focuses on creating and managing indexes in SQL, particularly using PROC SQL. It assesses skills related to index creation, ensuring uniqueness, composite index creation, index utilization... see morechecking, and index deletion. Essential for learners aiming to enhance their database management capabilities. see less

2. Which of the following will create an index on the column EmpID for the table Sasuser.Staffmaster?

Explanation

The index specified above is based on one column, so it is a simple index. In the CREATE INDEX statement, you specify the index name after the keywords CREATE INDEX. You do not include a keyword to specify that this is a simple index. The name of the key column is specified in parentheses after the table name. The name of a simple index must be the same as the name of the key column.

Submit
3. What is the purpose of specifying the data set option IDXWHERE=YES?

Explanation

The IDXWHERE=YES data set option tells SAS to use the best available index, even if the index does not optimize performance.

Submit
4. Which of the following is false regarding the IDXNAME= data set option?

Explanation

The IDXNAME= data set option directs PROC SQL to use an index that you specify. The specified index must exist and must be suitable by having at least its first or only column match the condition in the WHERE expression.

Submit
5. Which of the following will create a composite index for the table Sasuser.Flightdelays?(Sasuser.Flightdelays contains the following columns: Date, FlightNumber, Origin, Destination, DelayCategory, DestinationType, DayOfWeek, and Delay.)

Explanation

A composite index is based on two or more columns. In the CREATE INDEX statement, you specify the index name after the keywords CREATE INDEX. You do not include a keyword to specify that this is a composite index. The names of the key columns are specified in parentheses after the table name. The name of a composite index cannot be the same as the name of any columns in the table.

Submit
6. Which of the following is false regarding the use of an index?

Explanation

Indexes can be created on either character or numeric columns.

Submit
7. Which of the following will write a message to the SAS log that shows whether PROC SQL has used an index?

Explanation

Specifying the option MSGLEVEL=I causes informational messages about index usage to be written to the SAS log.

Submit
8. Which of the following will drop (delete) an index from a table?

Explanation

The DROP INDEX statement drops one or more specified indexes from a table. You specify the name of each index to be dropped after the keywords DROP INDEX. The table name is specified after the keyword FROM. The type of index and the names of the indexed columns are not specified in the statement.

Submit
9. Which of the following statements will show you all the indexes that are defined for a table?

Explanation

The DESCRIBE TABLE statement lists all indexes for one or more tables that you specify, along with other information about the table(s).

Submit
10. Using an index is not likely to optimize a PROC SQL query in which of the following situations?

Explanation

Using an index will optimize specific classes of PROC SQL queries. A query in which the key column is specified only in a SELECT clause is not one of these queries.

Submit
View My Results

Quiz Review Timeline (Updated): Feb 13, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Feb 13, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 12, 2013
    Quiz Created by
    Moxleyv
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which keyword must you add to your index definition in the CREATE...
Which of the following will create an index on the...
What is the purpose of specifying the data set option IDXWHERE=YES?
Which of the following is false regarding the IDXNAME= data set...
Which of the following will create a composite index for the...
Which of the following is false regarding the use of an index?
Which of the following will write a message to the SAS log that shows...
Which of the following will drop (delete) an index from a table?
Which of the following statements will show you all the indexes that...
Using an index is not likely to optimize a PROC SQL query in which of...
Alert!

Advertisement