Checking Whether a Query Is Accelerated
To check whether the current query is accelerated, tun the explain command to view the execution plan.
1 2 | set current_schema='tpchobs_express';
explain select count(*) from part;
|
The command output is as follows. If the command output contains PLAN ROUTER, the query is accelerated.
id | operation | E-rows | E-width | E-costs
----+--------------------------------------------------------+--------+---------+-----
1 | -> Row Adapter | 1 | 8 | 182.30
2 | -> Vector Aggregate | 1 | 8 | 182.30
3 | -> Vector Streaming (type: GATHER) | 6 | 8 | 182.30
4 | -> Vector Streaming (type: PLAN ROUTER) | 6 | 8 | 182.08
5 | -> Vector Streaming (type: SCAN GATHER) | 6 | 8 | 182.08
6 | -> Vector Aggregate | 6 | 8 | 182.08
7 | -> Vector Foreign Scan on part
| 3413 | 0 | 180.65
(7 rows)
Predicate Information (identified by plan id)
-----------------------------------------------
7 --Vector Foreign Scan on part
Server Type: obs
(2 rows)
- Note:
Query acceleration means that the current query is pushed down to the Express cluster for execution. To view the data volumes pushed down to the Express cluster, query system table gs_obsscaninfo. The query example is as follows:
1
select * from gs_obsscaninfo order by time_stamp desc;
The query result is shown in the following figure. The data_size column in the table stores all the scanning volumes (in bytes) pushed down to the Express cluster in the current query.
Figure 1 Query result
Last Article: Querying Data
Next Article: PostGIS Extension
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.