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
@@ -50,14 +50,16 @@ This table summarizes pushdown computation support on different external data so
50
50
51
51
\*\*\* Pushdown support for aggregations and filters for the MongoDB ODBC connector for SQL Server 2019 was introduced with SQL Server 2019 CU18.
52
52
53
+
\+ Oracle supports pushdown for joins but you might need to create statistics on the join columns to achieve pushdown.
54
+
53
55
> [!NOTE]
54
56
> Pushdown computation can be blocked by some T-SQL syntax. For more information, review [Syntax that prevents pushdown](polybase-pushdown-computation.md#syntax-that-prevents-pushdown).
55
57
56
58
### Pushdown computation and Hadoop providers
57
59
58
60
PolyBase currently supports two Hadoop providers: Hortonworks Data Platform (HDP) and Cloudera Distributed Hadoop (CDH). There are no differences between the two features in terms of pushdown computation.
59
61
60
-
To use the computation pushdown functionality with Hadoop, the target Hadoop cluster must have the core components of HDFS, YARN and MapReduce, with the job history server enabled. PolyBase submits the pushdown query via MapReduce and pulls status from the job history server. Without either component, the query fails.
62
+
To use the computation pushdown functionality with Hadoop, the target Hadoop cluster must have the core components of HDFS, YARN, and MapReduce, with the job history server enabled. PolyBase submits the pushdown query via MapReduce and pulls status from the job history server. Without either component, the query fails.
61
63
62
64
Some aggregation must occur after the data reaches [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. But a portion of the aggregation occurs in Hadoop. This method is common in computing aggregations in massively parallel processing systems.
63
65
@@ -85,14 +87,14 @@ In many cases, PolyBase can facilitate pushdown of the join operator for the joi
85
87
86
88
If the join can be done at the external data source, this reduces the amount of data movement and improves the query's performance. Without join pushdown, the data from the tables to be joined must be brought locally into tempdb, then joined.
87
89
88
-
Note that in the case of *distributed joins* (joining a local table to an external table), unless there is some filtering criteria on the external table that is applied to the join condition, all of the data in the external table must be brought locally into `tempdb` in order to perform the join operation. For example, the following query has no filtering on the external table join condition, which will result in all of the data from the external table being read.
90
+
In the case of *distributed joins* (joining a local table to an external table), unless there is a filter on the joined external table, all of the data in the external table must be brought locally into `tempdb` in order to perform the join operation. For example, the following query has no filtering on the external table join condition, which will result in all of the data from the external table being read.
89
91
90
92
```sql
91
93
SELECT*FROM LocalTable L
92
94
JOIN ExternalTable E onL.id=E.id
93
95
```
94
96
95
-
Since the join is on `E.id` column of the external table, if a filter condition is added to that column, the filter can be pushed down thereby reducing the number of rows read from the external table
97
+
Since the join is on `E.id` column of the external table, if a filter condition is added to that column, the filter can be pushed down thereby reducing the number of rows read from the external table.
96
98
97
99
```sql
98
100
SELECT*FROM LocalTable L
@@ -115,7 +117,7 @@ SELECT * FROM SensorData WHERE Speed > 65;
115
117
116
118
Use predicate pushdown to improve performance for a query that selects a subset of columns from an external table.
117
119
118
-
In this query, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] initiates a map-reduce job to pre-process the Hadoop delimited-text file so that only the data for the two columns, customer.name and customer.zip_code, will be copied to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
120
+
In this query, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] initiates a map-reduce job to preprocess the Hadoop delimited-text file so that only the data for the two columns, customer.name and customer.zip_code, will be copied to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
119
121
120
122
```sql
121
123
SELECTcustomer.name, customer.zip_code
@@ -187,7 +189,7 @@ Date & time functions
187
189
188
190
## Syntax that prevents pushdown
189
191
190
-
The following T-SQL functions or syntax will prevent pushdown computation:
192
+
The following T-SQL functions or syntax prevents pushdown computation:
191
193
192
194
-`AT TIME ZONE`
193
195
-`CONCAT_WS`
@@ -212,7 +214,7 @@ Pushdown support for the `FORMAT` and `TRIM` syntax was introduced in [!INCLUDE[
212
214
213
215
### Filter clause with variable
214
216
215
-
If you are specifying a variable in a filter clause, by default this will prevent pushdown of the filter clause. For example, if you run the following query, the filter clause will not be pushed down:
217
+
When specifying a variable in a filter clause, by default this prevents pushdown of the filter clause. For example, if you run the following query, the filter clause will not be pushed down:
216
218
217
219
```sql
218
220
DECLARE @BusinessEntityID INT
@@ -223,21 +225,21 @@ WHERE BusinessEntityID = @BusinessEntityID;
223
225
224
226
To achieve pushdown of the variable, you need to enable query optimizer hotfixes functionality. This can be done in any of the following ways:
225
227
- Instance Level: Enable trace flag 4199 as a startup parameter for the instance
226
-
- Database Level: In the context of the database that has the PolyBase external objects, execute ALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = ON
228
+
- Database Level: In the context of the database that has the PolyBase external objects, execute `ALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = ON`
227
229
- Query level:
228
-
Use query hint OPTION (QUERYTRACEON 4199) or OPTION (USE HINT ('ENABLE_QUERY_OPTIMIZER_HOTFIXES'))
230
+
Use query hint `OPTION (QUERYTRACEON 4199)` or `OPTION (USE HINT ('ENABLE_QUERY_OPTIMIZER_HOTFIXES'))`
229
231
230
232
This limitation applies to execution of [sp_executesql](../system-stored-procedures/sp-executesql-transact-sql.md). The limitation also applies to utilization of some functions in the filter clause.
231
233
232
-
Note: The ability to pushdown the variable was first introduced in SQL Server 2019 CU5.
234
+
The ability to pushdown the variable was first introduced in SQL Server 2019 CU5.
233
235
234
236
### Collation conflict
235
237
236
-
When working with data with different collation pushdown might not be possible, operators like `COLLATE` can also interfere with the outcome. Equal collations or binary collations are supported. For more information, see [How to tell if pushdown occurred](polybase-how-to-tell-pushdown-computation.md).
238
+
Pushdown might not be possible with data with different collations. Operators like `COLLATE` can also interfere with the outcome. Equal collations or binary collations are supported. For more information, see [How to tell if pushdown occurred](polybase-how-to-tell-pushdown-computation.md).
237
239
238
240
## Pushdown for parquet files
239
241
240
-
Starting in [!INCLUDE[sssql22-md](../../includes/sssql22-md.md)], PolyBase introduced support for parquet files. SQL Server is capable of performing both row and column elimination when performing pushdown with parquet. When working with parquet files, the following operations can be pushed down:
242
+
Starting in [!INCLUDE[sssql22-md](../../includes/sssql22-md.md)], PolyBase introduced support for parquet files. SQL Server is capable of performing both row and column elimination when performing pushdown with parquet. With parquet files, the following operations can be pushed down:
241
243
242
244
- Binary comparison operators (>, >=, <=, <) for numeric, date, and time values.
243
245
- Combination of comparison operators (> AND <, >= AND <, > AND <=, <= AND >=).
@@ -293,10 +295,7 @@ WHERE Speed > 65
293
295
OPTION (DISABLE EXTERNALPUSHDOWN);
294
296
```
295
297
296
-
## Next steps
298
+
## Related content
297
299
298
300
- For more information about PolyBase, see [Introducing data virtualization with PolyBase](polybase-guide.md)
299
-
300
-
## See also
301
-
302
301
-[How to tell if external pushdown occurred](polybase-how-to-tell-pushdown-computation.md)
0 commit comments