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
[!INCLUDE[SQL Server 2019](../includes/applies-to-version/sqlserver2019.md)]
17
17
18
-
PROSE Code Accelerator generates readable Python code for your data wrangling tasks. You can mix the generated code with your hand-written code in a seamless manner while working in a notebook within Azure Data Studio. This article provides an overview of how you can use the Code Accelerator.
18
+
PROSE Code Accelerator generates readable Python code for your data wrangling tasks.
19
+
You can mix the generated code with your hand-written code while working in a notebook within Azure Data Studio.
20
+
21
+
This article provides an overview of how you can use the Code Accelerator.
19
22
20
23
> [!NOTE]
21
24
> Program Synthesis using Examples, aka PROSE, is a Microsoft technology that generates human-readable code using AI. It does so by analyzing a user's intent as well as data, generating several candidate programs, and picking the best program using ranking algorithms. To know more about the PROSE technology, visit the [PROSE homepage](https://microsoft.github.io/prose/).
@@ -36,9 +39,11 @@ To get a general overview of Code Accelerator methods, see the [documentation](/
36
39
37
40
## Reading data from a file to a dataframe
38
41
39
-
Often, reading files to a dataframe involves looking at the content of the file and determining the correct parameters to pass to a data-loading library. Depending on the complexity of the file, identifying the correct parameters may require several iterations.
42
+
Reading files to a dataframe involves looking at the content of the file and determining the correct parameters to pass to a data-loading library.
43
+
44
+
Depending on the complexity of the file, identifying the correct parameters may require several iterations.
40
45
41
-
PROSE Code Accelerator solves this problem by analyzing the structure of the data file and automatically generating code to load the file. In most cases, the generated code parses the data correctly. In a few cases, you might need to tweak the code to meet your needs.
46
+
PROSE Code Accelerator solves this problem by analyzing the structure of the data file and automatically generating code to load the file. Normally, the generated code parses the data correctly. In a few cases, you might need to tweak the code to meet your needs.
42
47
43
48
Consider the following example:
44
49
@@ -85,9 +90,9 @@ Code Accelerator can generate code to load delimited, JSON, and fixed-width file
85
90
86
91
## Fixing data types in a dataframe
87
92
88
-
It is common to have a pandas or pyspark dataframe with wrong data types. Often, this happens because of a few non-conforming values in a column. As a result, Integers are read as Float or Strings, and Dates are read as Strings. The effort required to manually fix the data types is proportional to the number of columns.
93
+
It's common to have a pandas or pyspark dataframe with wrong data types. The incorrect datatype happens because of a few non-conforming values in a column. As a result, Integers are read as Float or Strings, and Dates are read as Strings. The effort required to manually fix the data types is proportional to the number of columns.
89
94
90
-
You can use the `DetectTypesBuilder` in these situations. It analyzes the data, and rather than fixing the data types in a black-box manner, it generates code for fixing the data types. The code serves as a starting point. You can review, use, or modify it as needed.
95
+
You can use the `DetectTypesBuilder` in these situations. It analyzes the data and generates code to fix the data types. The code serves as a starting point. You can review, use, or modify it as needed.
91
96
92
97
```python
93
98
import prose.codeaccelerator as cx
@@ -105,7 +110,7 @@ To learn more, see the [documentation](/python/api/overview/azure/prose/fixdatat
105
110
106
111
## Identifying patterns in Strings
107
112
108
-
Another common scenario is to detect patterns in a string column for the purpose of cleaning or grouping. For example, you may have a date column with dates in multiple different formats. In order to standardize the values, you might want to write conditional statements using regular expressions.
Copy file name to clipboardExpand all lines: docs/relational-databases/databases/rebuild-system-databases.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
@@ -184,11 +184,11 @@ ms.author: "sstein"
184
184
185
185
10. Backup the **msdb** database.
186
186
187
-
## <a name="RebuildTempdb"></a> Rebuild the Tempdb Database
187
+
## <a name="RebuildTempdb"></a> Rebuild the tempdb Database
188
188
189
189
If the **tempdb** database is damaged and the database engine fails to start, you can rebuild **tempdb** without the need to rebuild all system databases.
190
190
191
-
1. Rename the current Tempdb.mdfandTemplog.ldf files, if not missing.
191
+
1. Rename the current tempdb.mdfandtemplog.ldf files, if not missing.
192
192
1. Start [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] from a Command Prompt by using the following command.
193
193
194
194
```sql
@@ -203,7 +203,7 @@ If the **tempdb** database is damaged and the database engine fails to start, yo
203
203
1. Connect to the server by using **sqlcmd**, and then use the following stored procedure to reset the status of the tempdb database.
204
204
205
205
```sql
206
-
exec master..sp_resetstatus Tempdb
206
+
exec master..sp_resetstatus tempdb
207
207
```
208
208
209
209
1. Shut down the server by pressing CTRL+C in the command prompt window
Copy file name to clipboardExpand all lines: docs/relational-databases/query-processing-architecture-guide.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ The basic steps that [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] uses
143
143
- Arithmetic expressions, such as 1+1, 5/3*2, that contain only constants.
144
144
- Logical expressions, such as 1=1 and 1>2 AND 3>4, that contain only constants.
145
145
- Built-in functions that are considered foldable by [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)], including `CAST` and `CONVERT`. Generally, an intrinsic function is foldable if it is a function of its inputs only and not other contextual information, such as SET options, language settings, database options, and encryption keys. Nondeterministic functions are not foldable. Deterministic built-in functions are foldable, with some exceptions.
146
-
- Deterministic methods of CLR user-defined types and deterministic scalar-valued CLR user-defined functions (starting with [!INCLUDE[ssSQL11](../includes/sssql11-md.md)]). For more information, see [Constant Folding for CLR User-Defined Functions and Methods](/previous-versions/sql/2014/database-engine/behavior-changes-to-database-engine-features-in-sql-server-2014?view=sql-server-2014#constant-folding-for-clr-user-defined-functions-and-methods).
146
+
- Deterministic methods of CLR user-defined types and deterministic scalar-valued CLR user-defined functions (starting with [!INCLUDE[ssSQL11](../includes/sssql11-md.md)]). For more information, see [Constant Folding for CLR User-Defined Functions and Methods](/previous-versions/sql/2014/database-engine/behavior-changes-to-database-engine-features-in-sql-server-2014#constant-folding-for-clr-user-defined-functions-and-methods).
147
147
148
148
> [!NOTE]
149
149
> An exception is made for large object types. If the output type of the folding process is a large object type (text,ntext, image, nvarchar(max), varchar(max), varbinary(max), or XML), then [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] does not fold the expression.
@@ -690,7 +690,10 @@ The following examples illustrate which execution plans get removed from the pla
690
690
* An execution plan is frequently referenced so that its cost never goes to zero. The plan remains in the plan cache and is not removed unless there is memory pressure and the current cost is zero.
691
691
* An ad-hoc execution plan is inserted and is not referenced again before memory pressure exists. Since ad-hoc plans are initialized with a current cost of zero, when the [!INCLUDE[ssDEnoversion](../includes/ssdenoversion-md.md)] examines the execution plan, it will see the zero current cost and remove the plan from the plan cache. The ad-hoc execution plan remains in the plan cache with a zero current cost when memory pressure does not exist.
692
692
693
-
To manually remove a single plan or all plans from the cache, use [DBCC FREEPROCCACHE](../t-sql/database-console-commands/dbcc-freeproccache-transact-sql.md). Starting with [!INCLUDE[ssSQL15](../includes/sssql15-md.md)], the `ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE` to clear the procedure (plan) cache for the database in scope.
693
+
To manually remove a single plan or all plans from the cache, use [DBCC FREEPROCCACHE](../t-sql/database-console-commands/dbcc-freeproccache-transact-sql.md). [DBCC FREESYSTEMCACHE](../t-sql/database-console-commands/dbcc-freesystemcache-transact-sql.md) can also be used to clear any cache, including plan cache. Starting with [!INCLUDE[ssSQL15](../includes/sssql15-md.md)], the `ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE` to clear the procedure (plan) cache for the database in scope.
694
+
A change in some configuration settings via [sp_configure](system-stored-procedures/sp-configure-transact-sql.md) and [reconfigure](../t-sql/language-elements/reconfigure-transact-sql.md) will also cause plans to be removed from plan cache. You can find the list of these configuration settings in the Remarks section of the [DBCC FREEPROCCACHE](../t-sql/database-console-commands/dbcc-freeproccache-transact-sql.md#remarks) article. A configuration change like this will log the following informational message in the error log:
695
+
696
+
> `SQL Server has encountered %d occurrence(s) of cachestore flush for the '%s' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.`
Copy file name to clipboardExpand all lines: docs/t-sql/database-console-commands/dbcc-freeproccache-transact-sql.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,17 +37,16 @@ Removes all elements from the plan cache, removes a specific plan from the plan
37
37
38
38
[Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
39
39
40
-
## Syntax
40
+
## Syntax
41
+
Syntax for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]:
41
42
42
-
Syntax for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] and [!INCLUDE[ssSOD](../../includes/sssodfull-md.md)]:
Use DBCC FREEPROCCACHE to clear the plan cache carefully. Clearing the procedure (plan) cache causes all plans to be evicted, and incoming query executions will compile a new plan, instead of reusing any previously cached plan.
91
90
92
-
This can cause a sudden, temporary decrease in query performance as the number of new compilations increases. For each cleared cachestore in the plan cache, the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] error log will contain the following informational message: " [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] has encountered %d occurrence(s) of cachestore flush for the '%s' cachestore (part of plan cache) due to 'DBCC FREEPROCCACHE' or 'DBCC FREESYSTEMCACHE' operations." This message is logged every five minutes as long as the cache is flushed within that time interval.
91
+
This can cause a sudden, temporary decrease in query performance as the number of new compilations increases. For each cleared cachestore in the plan cache, the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] error log will contain the following informational message:
92
+
93
+
> `SQL Server has encountered %d occurrence(s) of cachestore flush for the '%s' cachestore (part of plan cache) due to 'DBCC FREEPROCCACHE' or 'DBCC FREESYSTEMCACHE' operations.`
94
+
95
+
This message is logged every five minutes as long as the cache is flushed within that time interval.
93
96
94
97
The following reconfigure operations also clear the procedure cache:
Copy file name to clipboardExpand all lines: docs/t-sql/database-console-commands/dbcc-freesystemcache-transact-sql.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,11 @@ NO_INFOMSGS
56
56
Suppresses all informational messages.
57
57
58
58
## Remarks
59
-
Running DBCC FREESYSTEMCACHE clears the plan cache for the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. Clearing the plan cache causes a recompilation of all upcoming execution plans and can cause a sudden, temporary reduction in query performance. For each cleared cachestore in the plan cache, the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] error log contains the following informational message: " [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] has encountered %d occurrence(s) of cachestore flush for the '%s' cachestore (part of plan cache) due to 'DBCC FREEPROCCACHE' or 'DBCC FREESYSTEMCACHE' operations." This message is logged every five minutes as long as the cache is flushed within that time interval.
59
+
Running DBCC FREESYSTEMCACHE clears the plan cache for the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. Clearing the plan cache causes a recompilation of all upcoming execution plans and can cause a sudden, temporary reduction in query performance. For each cleared cachestore in the plan cache, the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] error log contains the following informational message:
60
+
61
+
>`SQL Server has encountered %d occurrence(s) of cachestore flush for the '%s' cachestore (part of plan cache) due to 'DBCC FREEPROCCACHE' or 'DBCC FREESYSTEMCACHE' operations.`
62
+
63
+
This message is logged every five minutes as long as the cache is flushed within that time interval.
0 commit comments