Symptom
This is a SAP note with specific information about SAP HANA smart data access.
Other Terms
data federation, SAP HANA appliance, SAP HANA platform,
Reason and Prerequisites
You are using the SAP HANA platform as of SPS06. With SAP HANA SPS06
SAP HANA smart data access has been shipped for the first time.
Solution
The current functionality of SAP HANA smart data access supports
creation and deletion of statistics on virtual tables only. You can
create and drop statistics using the following comands:
[NOTE: Creating statistics on a virtual table can be an expensive operation, especially when it has a large number of rows and columns.]
CREATE STATISTICS ON <table name> (< column_name> {, <column_name>},..)] [TYPE HISTOGRAM]
The keywords "TYPE HISTOGRAM" is optional but type of histogram objects.
Examples:
To create histogram on all columns of virtual table "ASE_TAB1" that has five columns "a1", "a2", "a3", "a4", and "a5", you will have to issue the following command
CREATE STATISTICS ON "ASE_TAB1" ("a1", "a2", "a3"," a4", "a5");
To create histogram on columns "a1" and "a5" of "ASE_TAB1", you will have to provide the column names to the CREATE STATISTICS command as shown below:
CREATE STATISTICS ON ASE_TAB1(a1, a5) TYPE HISTOGRAM
DROP STATISTICS ON <virtual_table_name> [(<column_name> {, <column_name>},..)]
Examples:
To drop all histogram statistics on the virtual table "ASE_TAB1", you will use the following command:
DROP STATISTICS ON "ASE_TAB1";
To drop statistics on column "a5" of the virtual table "ASE_TAB1", you need to use the following command:
DROP STATISTICS ON "ASE_TAB1"("a5");
For more information about the following SQL comands:
see the SAP HANA SQL Reference on SAP Help Portal
http://help.sap.com/hana/SAP_HANA_SQL_Reference_en.pdf
- CREATE STATISTICS
[NOTE: Creating statistics on a virtual table can be an expensive operation, especially when it has a large number of rows and columns.]
CREATE STATISTICS ON <table name> (< column_name> {, <column_name>},..)] [TYPE HISTOGRAM]
The keywords "TYPE HISTOGRAM" is optional but type of histogram objects.
Examples:
To create histogram on all columns of virtual table "ASE_TAB1" that has five columns "a1", "a2", "a3", "a4", and "a5", you will have to issue the following command
CREATE STATISTICS ON "ASE_TAB1" ("a1", "a2", "a3"," a4", "a5");
To create histogram on columns "a1" and "a5" of "ASE_TAB1", you will have to provide the column names to the CREATE STATISTICS command as shown below:
CREATE STATISTICS ON ASE_TAB1(a1, a5) TYPE HISTOGRAM
- DROP STATISTICS
DROP STATISTICS ON <virtual_table_name> [(<column_name> {, <column_name>},..)]
Examples:
To drop all histogram statistics on the virtual table "ASE_TAB1", you will use the following command:
DROP STATISTICS ON "ASE_TAB1";
To drop statistics on column "a5" of the virtual table "ASE_TAB1", you need to use the following command:
DROP STATISTICS ON "ASE_TAB1"("a5");
For more information about the following SQL comands:
- CREATE STATISTICS
- DROP STATISTICS
- REFRESH STATISTIS
see the SAP HANA SQL Reference on SAP Help Portal
http://help.sap.com/hana/SAP_HANA_SQL_Reference_en.pdf
Header Data
Released On | 02.07.2013 14:42:37 |
Release Status | Released for Customer |
Component | HAN-DB SAP HANA Database |
Priority | Correction with high priority |
Category | Advance development |
No comments:
Post a Comment