Help Center > > Developer Guide> Using Express to Query Data on OBS> Using Express Clusters> Checking Whether a Query Is Accelerated

Checking Whether a Query Is Accelerated

Updated at: Jul 15, 2020 GMT+08:00

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

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel