You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/analysis-services/multidimensional-models-olap-logical-cube-objects/partitions-analysis-services-multidimensional-data.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,11 +34,11 @@ manager: kfile
34
34
Columns that are not used to define measures in the measure group can be present in some fact tables but absent in others. Similarly, columns that are not used to define attributes in related dimension tables can be present in some databases but absent in others. Tables that are not used for either fact tables or related dimension tables can be present in some databases but absent in others.
35
35
36
36
## Data Sources and Partition Storage
37
-
A partition is based either on a table or view in a data source, or on a table or named query in a data source view. The location where partition data is stored is defined by the data source binding. Typically, you can partition a measure group horizontally or vertically:
37
+
A partition is based either on a table or view in a data source, or on a table or named query in a data source view. The location where partition data is stored is defined by the data source binding. You can partition a measure group using either a single-table partition scheme, or a multi-table partition scheme:
38
38
39
-
- In a horizontally partitioned measure group, each partition in a measure group is based on a separate table. This kind of partitioning is appropriate when data is separated into multiple tables. For example, some relational databases have a separate table for each month's data.
39
+
- In a multi-table partition scheme each partition in a measure group partition is based on a separate table. This kind of partitioning is appropriate when data is separated into multiple tables. For example, some relational databases have a separate table for each month's data.
40
40
41
-
- In a vertically partitioned measure group, a measure group is based on a single table, and each partition is based on a source system query that filters the data for the partition. For example, if a single table contains several months data, the measure group could still be partitioned by month by applying a Transact-SQL WHERE clause that returns a separate month's data for each partition.
41
+
- In a single-table partition scheme a measure group is based on a single table, and each partition is based on a source system query that filters the data for the partition. For example, if a single table contains several months data, the measure group could still be partitioned by month by applying a Transact-SQL WHERE clause that returns a separate month's data for each partition.
42
42
43
43
Each partition has storage settings that determine whether the data and aggregations for the partition are stored in the local instance of [!INCLUDE[ssASnoversion](../../includes/ssasnoversion-md.md)] or in a remote partition using another instance of [!INCLUDE[ssASnoversion](../../includes/ssasnoversion-md.md)]. The storage settings can also specify the storage mode and whether proactive caching is used to control latency for a partition. For more information, see [Partition Storage Modes and Processing](../../analysis-services/multidimensional-models-olap-logical-cube-objects/partitions-partition-storage-modes-and-processing.md), [Proactive Caching (Partitions)](../../analysis-services/multidimensional-models-olap-logical-cube-objects/partitions-proactive-caching.md), and [Remote Partitions](../../analysis-services/multidimensional-models-olap-logical-cube-objects/partitions-remote-partitions.md).
|**Is_result_set_caching_on**|**int**|Reserved for internal use</br>**Applies to**: Azure SQL Data Warehouse
114
+
|**is_result_set_caching_on**|**int**|1 = is_result_set_caching_on is on</br>0 = is_result_set_caching_on is off</br>**Applies to**: Azure SQL Data Warehouse Gen2
115
115
116
116
## Permissions
117
117
If the caller of `sys.databases` is not the owner of the database and the database is not `master` or `tempdb`, the minimum permissions required to see the corresponding row are `ALTER ANY DATABASE` or the `VIEW ANY DATABASE` server-level permission, or `CREATE DATABASE` permission in the `master` database. The database to which the caller is connected can always be viewed in `sys.databases`.
Converts an *inputdate* to the corresponding *datetimeoffset* value in the target time zone. When *inputdate* is provided without offset information, the function applies the offset of the time zone assuming that *inputdate* is in the target time zone. If *inputdate* is provided as a *datetimeoffset* value, then **AT TIME ZONE** clause converts it into the target time zone using the time zone conversion rules.
Sets database options in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]and Azure SQL Database. For other ALTER DATABASE options, see [ALTER DATABASE](../../t-sql/statements/alter-database-transact-sql.md).
36
+
Sets database options in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], Azure SQL Database and Azure SQL Data Warehouse. For other ALTER DATABASE options, see [ALTER DATABASE](../../t-sql/statements/alter-database-transact-sql.md).
37
37
38
38
Click one of the following tabs for the syntax, arguments, remarks, permissions, and examples for a particular SQL version with which you're working.
39
39
@@ -45,9 +45,9 @@ In the following row, click whichever product name you're interested in. The cli
> Many database set options can be configured for the current session by using [SET Statements](../../t-sql/statements/set-statements-transact-sql.md) and are often configured by applications when they connect. Session level set options override the **ALTER DATABASE SET** values. The database options described below are values that can be set for sessions that don't explicitly provide other set option values.
2815
+
2816
+
## Syntax
2817
+
2818
+
```
2819
+
ALTER DATABASE { database_name | Current }
2820
+
SET
2821
+
{
2822
+
<optionspec> [ ,...n ]
2823
+
}
2824
+
;
2825
+
2826
+
<auto_option> ::=
2827
+
{}
2828
+
RESULT_SET_CACHING { ON | OFF}
2829
+
}
2830
+
```
2831
+
2832
+
## Arguments
2833
+
2834
+
*database_name*
2835
+
Is the name of the database to be modified.
2836
+
2837
+
**\<auto_option> ::=**
2838
+
2839
+
Controls automatic options.
2840
+
2841
+
**Permissions**:
2842
+
Requires these permissions:
2843
+
2844
+
- Server-level principal login (the one created by the provisioning process), or
2845
+
- Member of the dbmanager database role.
2846
+
2847
+
The owner of the database cannot alter the database unless the owner is a member of the dbmanager role.
2848
+
2849
+
<aname="result_set_caching"></a> RESULT_SET_CACHING { ON | OFF } (Preview for Gen2)
2850
+
This command must be run while connected to the master database. Change to this database setting takes effect immediately. Storage costs are incurred by caching query result sets. After disabling result caching for a database, previously persisted result cache will immediately be deleted from Azure SQL Data warehouse storage. A new column called is_result_set_caching_on is introduced in the sys.databases to show the result caching setting for a database.
2851
+
2852
+
ON
2853
+
Specifies that query result sets returned from this database will be cached in Azure SQL Data Warehouse storage.
2854
+
2855
+
OFF
2856
+
Specifies that query result sets returned from this database will not be cached in Azure SQL Data warehouse storage.
2857
+
Users can tell if a query was executed with a result cache hit or miss by querying sys.pdw_request_steps with a specific request_id. If there is a cache hit, the query result will have a single step with following details:
2858
+
2859
+
|**Column name**|**Operator**|**Value**|
2860
+
|----|----|----|
2861
+
| operation_type|=|ReturnOperation|
2862
+
|step_index|=|0|
2863
+
|location_type|=|Control|
2864
+
command|Like|%DWResultCacheDb%|
2865
+
|||
2866
+
2867
+
## Examples
2868
+
2869
+
### Enable result set caching for a database
2870
+
2871
+
```sql
2872
+
ALTERDATABASE myTestDW
2873
+
SET RESULT_SET_CACHING ON;
2874
+
```
2875
+
2876
+
### Disable result set caching for a database
2877
+
2878
+
```sql
2879
+
ALTERDATABASE myTestDW
2880
+
SET RESULT_SET_CACHING OFF;
2881
+
```
2882
+
2883
+
### Check result set caching setting for a database
2884
+
2885
+
```sql
2886
+
SELECT name, is_result_set_caching
2887
+
FROMsys.databases;
2888
+
```
2889
+
2890
+
### Check for number of queries with result set cache hit and cache miss
2891
+
2892
+
```sql
2893
+
SELECT
2894
+
Queries=CacheHits+CacheMisses,
2895
+
CacheHits,
2896
+
CacheMisses
2897
+
CacheHitPct=CacheHits*1.0/(CacheHits+CacheMisses)
2898
+
FROM
2899
+
(SELECT
2900
+
CacheHits=count(distinct case when s.commandlike'%DWResultCacheDb%'and
2901
+
r.resource_class IS NULLands.operation_type='ReturnOperation'and
2902
+
s.step_index=0 then s.request_id else null end) ,
2903
+
CacheMisses=count(distinct case when r.resource_classIS NOT NULL then
2904
+
s.request_id else null end)
2905
+
FROMsys.dm_pdw_request_steps s
2906
+
JOINsys.dm_pdw_exec_requests r
2907
+
ONs.request_id=r.request_id) A;
2908
+
```
2909
+
2910
+
### Check for result set cache hit or cache miss for a query
2911
+
2912
+
```sql
2913
+
If
2914
+
(SELECT step_index
2915
+
FROMsys.dm_pdw_request_steps
2916
+
WHERE request_id ='QID58286'and operation_type ='ReturnOperation'and command like'%DWResultCacheDb%') =0
2917
+
SELECT1as is_cache_hit
2918
+
ELSE
2919
+
SELECT0as is_cache_hit;
2920
+
```
2921
+
2922
+
### Check for all queries with result set cache hits
2923
+
2924
+
```sql
2925
+
SELECT*
2926
+
FROMsys.dm_pdw_request_steps
2927
+
WHERE command like'%DWResultCacheDb%'and step_index =0;
Copy file name to clipboardExpand all lines: docs/t-sql/statements/alter-database-transact-sql.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -725,12 +725,13 @@ ALTER DATABASE { database_name | CURRENT }
725
725
}
726
726
727
727
```
728
+
728
729
## Arguments
729
730
730
-
*database_name*
731
+
*database_name*
731
732
Is the name of the database to be modified.
732
733
733
-
CURRENT
734
+
CURRENT
734
735
Designates that the current database in use should be altered.
735
736
736
737
## Remarks
@@ -791,16 +792,24 @@ ALTER DATABASE WideWorldImporters
791
792
792
793
## Overview: Azure SQL Data Warehouse
793
794
794
-
Modifies the name, maximum size, or service objective for a database.
795
+
In Azure SQL Dta Warehouse, 'ALTER DATABASE' modifies the name, maximum size, or service objective for a database.
795
796
796
-
## Syntax
797
+
Because of its length, the ALTER DATABASE syntax is separated into the multiple articles.
797
798
798
-
```
799
-
ALTER DATABASE database_name
799
+
[ALTER DATABASE SET Options](../../t-sql/statements/alter-database-transact-sql-set-options.md)
800
+
Provides the syntax and related information for changing the attributes of a database by using the SET options of ALTER DATABASE.
800
801
802
+
## Syntax
803
+
804
+
```console
805
+
ALTER DATABASE { database_name | CURRENT }
806
+
{
801
807
MODIFY NAME = new_database_name
802
808
| MODIFY ( <edition_option> [, ... n] )
803
-
809
+
| SET <option_spec> [ ,...n ] [ WITH <termination> ]
810
+
}
811
+
[;]
812
+
804
813
<edition_option> ::=
805
814
MAXSIZE = {
806
815
250 | 500 | 750 | 1024 | 5120 | 10240 | 20480
@@ -818,13 +827,13 @@ ALTER DATABASE database_name
818
827
819
828
## Arguments
820
829
821
-
*database_name*
830
+
*database_name*
822
831
Specifies the name of the database to be modified.
823
832
824
-
MODIFY NAME = *new_database_name*
833
+
MODIFY NAME = *new_database_name*
825
834
Renames the database with the name specified as *new_database_name*.
826
835
827
-
MAXSIZE
836
+
MAXSIZE
828
837
The default is 245,760 GB (240 TB).
829
838
830
839
**Applies to:** Optimized for Compute Gen1
@@ -835,7 +844,7 @@ The maximum allowable size for the database. The database cannot grow beyond MAX
835
844
836
845
The maximum allowable size for rowstore data in the database. Data stored in rowstore tables, a columnstore index's deltastore, or a nonclustered index on a clustered columnstore index cannot grow beyond MAXSIZE. Data compressed into columnstore format does not have a size limit and is not constrained by MAXSIZE.
837
846
838
-
SERVICE_OBJECTIVE
847
+
SERVICE_OBJECTIVE
839
848
Specifies the performance level. For more information about service objectives for SQL Data Warehouse, see [Data Warehouse Units (DWUs)](https://docs.microsoft.com/azure/sql-data-warehouse/what-is-a-data-warehouse-unit-dwu-cdwu).
0 commit comments