Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yaojiejia
Copy link
Contributor

Closes 12. EXPLAIN ANALYSE from #912

Copy link
Contributor

@mrigger mrigger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the code is currently used only by the Query Plan Guidance (QPG) component. If we execute ANALYZE for it, performance would drop. I guess we could have separate public methods, one for QPG and one that we use in the provider class.

@yaojiejia
Copy link
Contributor Author

I think the code is currently used only by the Query Plan Guidance (QPG) component. If we execute ANALYZE for it, performance would drop. I guess we could have separate public methods, one for QPG and one that we use in the provider class.

I see, looking over the PostgresProvider class, I can only see that the PostgresExplainGenerator is being used in getQueryPlan method which it will definitely drop the performance by adding the analyze part, but you also mentioned I should create another method for the provider class, could you maybe elaborate on that part?

@mrigger
Copy link
Contributor

mrigger commented Jun 9, 2025

We could add an enum (see

CREATE_VIEW(PostgresViewGenerator::create);
). In this enum, we can specify a newly-created method in the explain generator that can generate the full range of EXPLAIN, while we can keep using the restricted method for QPG.

@mrigger
Copy link
Contributor

mrigger commented Jul 6, 2025

@yaojiejia, I see you have been working on multiple other PRs. Do you think it would be possible to focus on the open ones, so we can merge those first?

@yaojiejia
Copy link
Contributor Author

@yaojiejia, I see you have been working on multiple other PRs. Do you think it would be possible to focus on the open ones, so we can merge those first?

Of course, will prioritize these for now, thanks

@yaojiejia
Copy link
Contributor Author

We could add an enum (see

CREATE_VIEW(PostgresViewGenerator::create);

). In this enum, we can specify a newly-created method in the explain generator that can generate the full range of EXPLAIN, while we can keep using the restricted method for QPG.

Just included a method for EXPLAIN. Lmk if this is something we are looking for

JIT("jit", (r) -> Randomly.fromOptions(1, 0)),
JOIN_COLLAPSE_LIMIT("join_collapse_limit", (r) -> r.getInteger(1, Integer.MAX_VALUE)),
PARALLEL_LEADER_PARTICIPATION("parallel_leader_participation", (r) -> Randomly.fromOptions(1, 0)),
FORCE_PARALLEL_MODE("force_parallel_mode", (r) -> Randomly.fromOptions("off", "on", "regress")),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems unrelated. Can we remove this? Other than that, the PR looks good to go.

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