itgle.com

单选题You want to capture column group usage and gather extended statistics for better cardinality estimates for the CUSTOMERS table in the SH schema. Examine the following steps: 1. Issue the SELECT DBMS_STATS.CREATE_EXTENDED_STATS (‘SH’, ‘CUSTOMERS’) FROM

题目
单选题
You want to capture column group usage and gather extended statistics for better cardinality estimates for the CUSTOMERS table in the SH schema. Examine the following steps: 1. Issue the SELECT DBMS_STATS.CREATE_EXTENDED_STATS (‘SH’, ‘CUSTOMERS’) FROM dual statement. 2. Execute the DBMS_STATS.SEED_COL_USAGE (null, ‘SH’, 500) procedure. 3. Execute the required queries on the CUSTOMERS table. 4. Issue the SELECT DBMS_STATS.REPORT_COL_USAGE (‘SH’, ‘CUSTOMERS’) FROM dual statement. Identify the correct sequence of steps.()
A

3,2,1,4

B

2,3,4,1

C

4,1,3,2

D

3,2,4,1


相似考题
参考答案和解析
正确答案: C
解析: 暂无解析
更多“单选题You want to capture column group usage and gather extended statistics for better cardinality estimates for the CUSTOMERS table in the SH schema. Examine the following steps: 1. Issue the SELECT DBMS_STATS.CREATE_EXTENDED_STATS (‘SH’, ‘CUSTOMERS’) FROM ”相关问题
  • 第1题:

    Which three statements are true about SQL plan directives?()

    A. They are tied to a specific statement or SQL id.

    B. They instruct the maintenance job to collect missing statistics or perform dynamic sampling to generate a more optimal plan.

    C. They are used to gather only missing statistics.

    D. They are created for a query expression where statistics are missing or the cardinality estimates by the optimizer are incorrect.

    E. They instruct the optimizer to create only column group statistics.

    F. Improve plan accuracy by persisting both compilation and execution statistics in the SYSAUX tablespace.


    参考答案:B, D, E

  • 第2题:

    The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) The CUSTOMER_ID column is the primary key for the table. Which two statements find the number of customers? ()

    • A、SELECT TOTAL(*) FROM customer;
    • B、SELECT COUNT(*) FROM customer;
    • C、SELECT TOTAL(customer_id) FROM customer;
    • D、SELECT COUNT(customer_id) FROM customer;
    • E、SELECT COUNT(customers) FROM customer;
    • F、SELECT TOTAL(customer_name) FROM customer;

    正确答案:B,D

  • 第3题:

    You want to capture column group usage and gather extended statistics for better cardinality estimates for the CUSTOMERS table in the SH schema. Examine the following steps: 1. Issue the SELECT DBMS_STATS.CREATE_EXTENDED_STATS (‘SH’, ‘CUSTOMERS’) FROM dual statement. 2. Execute the DBMS_STATS.SEED_COL_USAGE (null, ‘SH’, 500) procedure. 3. Execute the required queries on the CUSTOMERS table. 4. Issue the SELECT DBMS_STATS.REPORT_COL_USAGE (‘SH’, ‘CUSTOMERS’) FROM dual statement. Identify the correct sequence of steps.()

    • A、3,2,1,4
    • B、2,3,4,1
    • C、4,1,3,2
    • D、3,2,4,1

    正确答案:B

  • 第4题:

    You executed the following commands:   SQL> ALTER SESSION SET OPTIMIZER_USE_PENDING_STATISTICS = false; SQL> EXECUTE DBMS_STATS.SET_TABLE_PREFS(’SH’, ’CUSTOMERS’, ’PUBLISH’,’false’); SQL> EXECUTE DBMS_STATS.GATHER_TABLE_STATS(’SH’, ’CUSTOMERS’);   Which statement is correct regarding the above statistics collection on the SH.CUSTOMERS table in the above session?()

    • A、 The statistics are stored in the pending statistics table in the data dictionary.
    • B、 The statistics are treated as the current statistics by the optimizer for all sessions.
    • C、 The statistics are treated as the current statistics by the optimizer for the current sessions only.
    • D、 The statistics are temporary and used by the optimizer for all sessions until this session terminates.

    正确答案:A

  • 第5题:

    Consider the following statement:   SQL> EXECUTE DBMS_STATS.GATHER_SHEMA_STATS (-  2> ownname => ‘OE’, -  3> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, -  4> method opt => ‘for all columns size AUTO’);   What is the effect of ‘for all columns size AUTO’ of the METHOD_OPT option?()

    • A、The Oracle server creates a new histogram based on existing histogram definitions for all table, column, and index statistics for the OE schema. 
    • B、The Oracle server creates a histogram based on data distribution regardless of how the application uses the column/s for all table, column, and index statistics for the OE schema.
    • C、The Oracle server creates a histogram based on data and application usage of the column/s for all table, column, and index statistics for the OE schema. 
    • D、The Oracle server creates a histogram based on application usage, regardless of data distribution, for all table, column, and index statistics for the OE schema.

    正确答案:C

  • 第6题:

    单选题
    You want to capture column group usage and gather extended statistics for better cardinality estimates for the CUSTOMERS table in the SH schema. Examine the following steps: 1. Issue the SELECT DBMS_STATS.CREATE_EXTENDED_STATS (‘SH’, ‘CUSTOMERS’) FROM dual statement. 2. Execute the DBMS_STATS.SEED_COL_USAGE (null, ‘SH’, 500) procedure. 3. Execute the required queries on the CUSTOMERS table. 4. Issue the SELECT DBMS_STATS.REPORT_COL_USAGE (‘SH’, ‘CUSTOMERS’) FROM dual statement. Identify the correct sequence of steps.()
    A

    3,2,1,4

    B

    2,3,4,1

    C

    4,1,3,2

    D

    3,2,4,1


    正确答案: A
    解析: 暂无解析

  • 第7题:

    单选题
    You need to produce a report for mailing labels for all customers. The mailing label must have only the customer name and address. The CUSTOMERS table has these columns: CUST_ID NUMBER(4) NOT NULL CUST_NAME VARCHAR2(100) NOT NULL CUST_ADDRESS VARCHAR2(150) CUST_PHONE VARCHAR2(20) Which SELECT statement accomplishes this task?()
    A

    SELECT* FROM customers;

    B

    SELECT name, address FROM customers;

    C

    SELECT id, name, address, phone FROM customers;

    D

    SELECT cust_name, cust_address FROM customers;

    E

    SELECT cust_id, cust_name, cust_address, cust_phone FROM customers;


    正确答案: C
    解析: 暂无解析

  • 第8题:

    多选题
    Which three statements are true about SQL plan directives?()
    A

    They are tied to a specific statement or SQL id.

    B

    They instruct the maintenance job to collect missing statistics or perform dynamic sampling to generate a more optimal plan.

    C

    They are used to gather only missing statistics.

    D

    They are created for a query expression where statistics are missing or the cardinality estimates by the optimizer are incorrect.

    E

    They instruct the optimizer to create only column group statistics.

    F

    Improve plan accuracy by persisting both compilation and execution statistics in the SYSAUX tablespace.


    正确答案: B,D,E
    解析: 暂无解析

  • 第9题:

    单选题
    Examine the command:  SQL> DBMS_STATS.SET_TABLE_PREFS(’SH’, ’CUSTOMERS’, ’PUBLISH’, ’false’); Which statement describes the effect of the above command()
    A

    Automatic statistics collection is stopped for the CUSTOMERS table.

    B

    Statistics for the CUSTOMERS table are locked and cannot be overwritten.

    C

    Existing statistics for the CUSTOMERS table become unusable for the query optimizer.

    D

    Subsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics.


    正确答案: B
    解析: 暂无解析

  • 第10题:

    单选题
    Consider the following statement:   SQL> EXECUTE DBMS_STATS.GATHER_SHEMA_STATS (-  2> ownname => ‘OE’, -  3> estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, -  4> method opt => ‘for all columns size AUTO’);   What is the effect of ‘for all columns size AUTO’ of the METHOD_OPT option?()
    A

    The Oracle server creates a new histogram based on existing histogram definitions for all table, column, and index statistics for the OE schema. 

    B

    The Oracle server creates a histogram based on data distribution regardless of how the application uses the column/s for all table, column, and index statistics for the OE schema.

    C

    The Oracle server creates a histogram based on data and application usage of the column/s for all table, column, and index statistics for the OE schema. 

    D

    The Oracle server creates a histogram based on application usage, regardless of data distribution, for all table, column, and index statistics for the OE schema.


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    You executed the following commands:   SQL> ALTER SESSION SET OPTIMIZER_USE_PENDING_STATISTICS = false; SQL> EXECUTE DBMS_STATS.SET_TABLE_PREFS(’SH’, ’CUSTOMERS’, ’PUBLISH’,’false’); SQL> EXECUTE DBMS_STATS.GATHER_TABLE_STATS(’SH’, ’CUSTOMERS’);   Which statement is correct regarding the above statistics collection on the SH.CUSTOMERS table in the above session?()
    A

     The statistics are stored in the pending statistics table in the data dictionary.

    B

     The statistics are treated as the current statistics by the optimizer for all sessions.

    C

     The statistics are treated as the current statistics by the optimizer for the current sessions only.

    D

     The statistics are temporary and used by the optimizer for all sessions until this session terminates.


    正确答案: D
    解析: 暂无解析

  • 第12题:

    单选题
    You need to produce a report for mailing labels for all customers. The mailing label must have only the customer name and address. The CUSTOMERS table has these columns: Which SELECT statement accomplishes this task?()
    A

    SELECT*   FROM customers;

    B

    SELECT name, address   FROM customers;

    C

    SELECT id, name, address, phone   FROM customers;

    D

    SELECT cust_name, cust_address   FROM customers;

    E

    SELECT cust_id, cust_name, cust_address, cust_phone   FROM customers;


    正确答案: D
    解析: 暂无解析

  • 第13题:

    You need to generate a list of all customer last names with their credit limits from the CUSTOMERS table. Those customers who do not have a credit limit should appear last in the list. Which two queries would achieve the required result?()

    • A、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit DESC
    • B、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit
    • C、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit NULLS LAST
    • D、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_last_name, cust_credit_limit NULLSLAST

    正确答案:B,C

  • 第14题:

    Examine the command: SQL> DBMS_STATS.SET_TABLE_PREFS(’SH’, ’CUSTOMERS’, ’PUBLISH’, ’false’);  Which statementdescribes the effect of the above command()

    • A、Automatic statistics collection is stopped for the CUSTOMERS table.
    • B、Statistics for the CUSTOMERS table are locked and cannot be overwritten.
    • C、Existing statistics for the CUSTOMERS table become unusable for the query optimizer.
    • D、Subsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics

    正确答案:D

  • 第15题:

    Examine the description of the CUSTOMERS table: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) The CUSTOMER_ID column is the primary key for the table. Which statement returns the city address and the number of customers in the cities Los Angeles or San Francisco?()

    • A、SELECT city_address, COUNT(*) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco');
    • B、SELECT city_address, COUNT(*) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco') GROUP BY city_address;
    • C、SELECT city_address, COUNT(customer_id) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco') GROUP BY city_address, customer_id;
    • D、SELECT city_address, COUNT(customer_id) FROM customers GROUP BY city_address IN ('Los Angeles', 'San Francisco');

    正确答案:B

  • 第16题:

    Examine this command: SQL > exec DBMS_STATS.SET_TABLE_PREFS (‘SH’, ‘CUSTOMERS’, ‘PUBLISH’, ‘false’); Which three statements are true about the effect of this command?()

    • A、Statistics collection is not done for the CUSTOMERS table when schema stats are gathered.
    • B、Statistics collection is not done for the CUSTOMERS table when database stats are gathered.
    • C、Any existing statistics for the CUSTOMERS table are still available to the optimizer at parse time.
    • D、Statistics gathered on the CUSTOMERS table when schema stats are gathered are stored as pending statistics.
    • E、Statistics gathered on the CUSTOMERS table when database stats are gathered are stored as pending statistics.

    正确答案:A,C,D

  • 第17题:

    Examine the command:  SQL> DBMS_STATS.SET_TABLE_PREFS(’SH’, ’CUSTOMERS’, ’PUBLISH’, ’false’); Which statement describes the effect of the above command()

    • A、Automatic statistics collection is stopped for the CUSTOMERS table.
    • B、Statistics for the CUSTOMERS table are locked and cannot be overwritten.
    • C、Existing statistics for the CUSTOMERS table become unusable for the query optimizer.
    • D、Subsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics.

    正确答案:D

  • 第18题:

    单选题
    Examine the description of the CUSTOMERS table: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) The CUSTOMER_ID column is the primary key for the table. Which statement returns the city address and the number of customers in the cities Los Angeles or San Francisco?()
    A

    SELECT city_address, COUNT(*) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco');

    B

    SELECT city_address, COUNT(*) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco') GROUP BY city_address;

    C

    SELECT city_address, COUNT(customer_id) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco') GROUP BY city_address, customer_id;

    D

    SELECT city_address, COUNT(customer_id) FROM customers GROUP BY city_address IN ('Los Angeles', 'San Francisco');


    正确答案: D
    解析: 暂无解析

  • 第19题:

    多选题
    Examine this command: SQL > exec DBMS_STATS.SET_TABLE_PREFS (‘SH’, ‘CUSTOMERS’, ‘PUBLISH’, ‘false’); Which three statements are true about the effect of this command?()
    A

    Statistics collection is not done for the CUSTOMERS table when schema stats are gathered.

    B

    Statistics collection is not done for the CUSTOMERS table when database stats are gathered.

    C

    Any existing statistics for the CUSTOMERS table are still available to the optimizer at parse time.

    D

    Statistics gathered on the CUSTOMERS table when schema stats are gathered are stored as pending statistics.

    E

    Statistics gathered on the CUSTOMERS table when database stats are gathered are stored as pending statistics.


    正确答案: E,B
    解析: 暂无解析

  • 第20题:

    单选题
    Examine the command: SQL> DBMS_STATS.SET_TABLE_PREFS(’SH’, ’CUSTOMERS’, ’PUBLISH’, ’false’);  Which statementdescribes the effect of the above command()
    A

    Automatic statistics collection is stopped for the CUSTOMERS table.

    B

    Statistics for the CUSTOMERS table are locked and cannot be overwritten.

    C

    Existing statistics for the CUSTOMERS table become unusable for the query optimizer.

    D

    Subsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics


    正确答案: C
    解析: 暂无解析

  • 第21题:

    单选题
    You executed the following commands: Which statement is correct regarding the above statistics collection on the SH.CUSTOMERS table in the above session?()
    A

    The statistics are stored in the pending statistics table in the data dictionary.

    B

    The statistics are treated as the current statistics by the optimizer for all sessions.

    C

    The statistics are treated as the current statistics by the optimizer for the current sessions only.

    D

    The statistics are temporary and used by the optimizer for all sessions until this session terminates.


    正确答案: A
    解析: 暂无解析

  • 第22题:

    单选题
    You have a range-partitioned table in your database. Each partition in the table contains the sales data for a quarter.  The partition related to the current quarter is modified frequently and other partitions undergo fewer data manipulations. The preferences for the table are set to their default values. You collect statistics for the table using the following command in regular intervals: SQL> EXECUTE  DBMS_STATS.GATHER_TABLE_STATS(’SH’,’SALES’,GRANULARITY=>’GLOBAL’);   You need statistics to be collected more quickly.  What can you do to achieve this?()
    A

     Set DYNAMIC_SAMPLING to level 4

    B

     Set the STATISTICS_LEVEL parameter to BASIC

    C

     Set the INCREMENTAL value to TRUE for the partition table

    D

     Increase the value of STALE_PERCENT for the partition table


    正确答案: D
    解析: 暂无解析

  • 第23题:

    单选题
    Exhibit: Examine the data in the EMPLOYEES table. Examine the subquery: SELECT last_name FROM employees WHERE salary IN (SELECT MAX(salary) FROM employees GROUP BY department_id); Which statement is true?()
    A

    The SELECT statement is syntactically accurate.

    B

    The SELECT statement does not work because there is no HAVING clause.

    C

    The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.

    D

    The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.


    正确答案: C
    解析: 暂无解析