Details
-
New Feature
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
Description
This is closely related to MCOL-5756 and possibly blocks it.
In case of SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY 1 server performs a partial pushdown, only - for individual SELECT * FROM .... The UNION and ORDER BY processing is done on the server.
The first problem is that pushdowns to Columnstore handler for both SELECT * FROM ... receive a SELECT_LEX for complete statement, not statements to SELECT from tables. This is what causes problems in the aforementioned MCOL-5756.
The second problem is that there is no attempt to pushdown whole processing of UNION and ORDER BY to the Columnstore engine's handler. The processing of SELECT does attempt a whole statement pushdown, the UNION+ORDER BY processing does not. This means that SELECT * FROM (SELECT * FROM t1 UNION SELECT * FROM t2) u ORDER BY 1 goes to Columnstore's handler and UNION+ORDER BY in the top statement does not. This greatly reduces performance of UNION+ORDER BY processing compared to Columnstore's processing.
It would be nice if UNION+ORDER BY processing on the server attempted to pushdown a whole request to the Columnstore before attempting to find partial handlers.
Attachments
Issue Links
- blocks
-
MCOL-5756 Handle UNION pushdown edge case that triggers slow table mode processing
-
- Closed
-