Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: lazy initialize orca optimizer #191

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

lss602726449
Copy link
Contributor

@lss602726449 lss602726449 commented Sep 6, 2023

closes: #ISSUE_Number


Change logs

We lazy initialize the orca optimizer, because the InitGPOPT() will consume losts of memory. his may increase the number of connections to QD, thereby increasing tps.

Why are the changes needed?

Describe why the changes are necessary.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Please detail how the changes were tested, including manual tests and any relevant unit or integration tests.

Contributor's Checklist

Here are some reminders and checklists before/when submitting your pull request, please check them:

  • Make sure your Pull Request has a clear title and commit message. You can take git-commit template as a reference.
  • Sign the Contributor License Agreement as prompted for your first-time contribution(One-time setup).
  • Learn the coding contribution guide, including our code conventions, workflow and more.
  • List your communication in the GitHub Issues or Discussions (if has or needed).
  • Document changes.
  • Add tests for the change
  • Pass make installcheck
  • Pass make -C src/test installcheck-cbdb-parallel
  • Feel free to @cloudberrydb/dev team for review and approval when your PR is ready🥳

@lss602726449 lss602726449 force-pushed the lazy_initialize_orca branch 3 times, most recently from 08a972e to 5d63f01 Compare September 7, 2023 02:08
InitGPOPT is called in the QD initialization phase, which will
affect the memory overhead of about 800KB for each QD connection. We
postpone InitGPOPT before calling ORCA's optimize_query. The postgres
optimizer may set ORCA through disable_xform and enable_xform, we also
added InitGPOPT for these function.
@my-ship-it my-ship-it merged commit 12d6caf into apache:main Sep 20, 2023
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.

3 participants