Skip to content

Conversation

@andr-sokolov
Copy link
Contributor

@andr-sokolov andr-sokolov commented Oct 25, 2025

Don't try to use Orca for queries that it doesn't support

On translating to DXL we can find out that the query is unsupported. The better
time to make this decision is analyse stage, because in this case we can run
Postgres planner without trying to run Orca and, as a consequence, significantly
reduce planning time.
Orca doesn't support gp_dist_random, queries on master-only tables, and function
exec locations except for any. It's easy to detect on analyse stage, that
a query contains these unsupported query properties.
The number of unsupported query properties to check before translating to DXL
will be increased later.


Before the patch

postgres=# select oid from pg_class where relname='pg_class';
 oid  
------
 1259
(1 row)

Time: 9,869 ms
postgres=# 

After the patch

postgres=# select oid from pg_class where relname='pg_class';
 oid  
------
 1259
(1 row)

Time: 1,995 ms
postgres=#

Don't plan simple inserts using Orca

On translating to DXL we can find out that the query is unsupported. The better
time to make this decision is analyse stage, because in this case we can run
Postgres planner without trying to run Orca and, as a consequence, significantly
reduce planning time.
Orca doesn't support gp_dist_random, queries on master-only tables, and function
exec locations except for any. It's easy to detect on analyse stage, that
a query contains these unsupported query properties.
The number of unsupported query properties to check before translating to DXL
will be increased later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants