Skip to content

Implement a server-side cursor to improve performance when fetching large volumes of data. #5797 #8837

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

khushboovashi
Copy link
Contributor

No description provided.

Copy link
Contributor

@akshay-joshi akshay-joshi left a comment

Choose a reason for hiding this comment

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

GUI-related comments:

  1. Select 'Use server cursor' from the query tool. Run "select 1" query. Clicking on the Commit button gets the error message " the cursor is closed" and on Rollback "DECLARE "CURSOR:CONN:961921" CURSOR FOR ROLLBACK;" Disable those buttons in server cursor mode.
  2. Set "Execute with server side cursor?" To true. Select any table and click on View/Edit data. It executes the query, but again commit and rollback buttons get enabled. Now try following:
  • Try to close the tab. It will not.
  • Pagination shows Page no 1 of 0.
  • Click on Next page or Previous page, nothing happens, and the data is lost.    

Code-related comments:

  1. Add this new 'Use server cursor?" preference to the preferences.rst. The screenshot will be updated after Aditya's PR.
  2. Fix 3 small code smells in sqleditor/init.py

@khushboovashi
Copy link
Contributor Author

GUI-related comments:

  1. Select 'Use server cursor' from the query tool. Run "select 1" query. Clicking on the Commit button gets the error message " the cursor is closed" and on Rollback "DECLARE "CURSOR:CONN:961921" CURSOR FOR ROLLBACK;" Disable those buttons in server cursor mode.

Fixed the issue. I have disabled the buttons right now in View/Edit data but that is debatable, we will discuss that in the review.

  1. Set "Execute with server side cursor?" To true. Select any table and click on View/Edit data. It executes the query, but again commit and rollback buttons get enabled. Now try following:
  • Try to close the tab. It will not.
    Fixed
  • Pagination shows Page no 1 of 0.
    Fixed
  • Click on Next page or Previous page, nothing happens, and the data is lost.
    Didn't reproduce

Code-related comments:

  1. Add this new 'Use server cursor?" preference to the preferences.rst. The screenshot will be updated after Aditya's PR.
    Fixed
  2. Fix 3 small code smells in sqleditor/init.py

Copy link
Contributor

@akshay-joshi akshay-joshi left a comment

Choose a reason for hiding this comment

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

Update the preferences screenshot.

@@ -0,0 +1,117 @@
# -*- coding: utf-8 -*-
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this "-- coding: utf-8 --"

Copy link
Contributor

Choose a reason for hiding this comment

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

Update the screenshot as the label changed to "Use server cursor?".

@@ -46,7 +46,7 @@ const StyledBox = styled(Box)(({theme}) => ({
...theme.mixins.panelBorder.bottom,
}));

function autoCommitRollback(type, api, transId, value) {
function autoCommitRollbackServerCur(type, api, transId, value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You’ve changed the name, which is good, but choosing a more generic name for the future would be better. Appending to a specific name could become difficult if additional menus are added 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