-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
perf: add indexes on payment entry reference #33288
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds index on: 1. reference doctype 2. reference name *Why not composite index?* There are three type of queries on this doctype - filtering ref_doctype - doctype index helps here - filtering ref_name - name index helps here - filtering both - name index helps here too. Since it has sufficiently high cardinality. Composite index wont help in case where ref_doctype isn't specfied.
mergify bot
pushed a commit
that referenced
this pull request
Dec 12, 2022
Adds index on: 1. reference doctype 2. reference name *Why not composite index?* There are three type of queries on this doctype - filtering ref_doctype - doctype index helps here - filtering ref_name - name index helps here - filtering both - name index helps here too. Since it has sufficiently high cardinality. Composite index wont help in case where ref_doctype isn't specfied. [skip ci] (cherry picked from commit 593626f)
mergify bot
pushed a commit
that referenced
this pull request
Dec 12, 2022
Adds index on: 1. reference doctype 2. reference name *Why not composite index?* There are three type of queries on this doctype - filtering ref_doctype - doctype index helps here - filtering ref_name - name index helps here - filtering both - name index helps here too. Since it has sufficiently high cardinality. Composite index wont help in case where ref_doctype isn't specfied. [skip ci] (cherry picked from commit 593626f)
ankush
added a commit
that referenced
this pull request
Dec 12, 2022
perf: add indexes on payment entry reference (#33288) Adds index on: 1. reference doctype 2. reference name *Why not composite index?* There are three type of queries on this doctype - filtering ref_doctype - doctype index helps here - filtering ref_name - name index helps here - filtering both - name index helps here too. Since it has sufficiently high cardinality. Composite index wont help in case where ref_doctype isn't specfied. [skip ci] (cherry picked from commit 593626f) Co-authored-by: Ankush Menat <ankush@frappe.io>
ankush
added a commit
that referenced
this pull request
Dec 12, 2022
perf: add indexes on payment entry reference (#33288) Adds index on: 1. reference doctype 2. reference name *Why not composite index?* There are three type of queries on this doctype - filtering ref_doctype - doctype index helps here - filtering ref_name - name index helps here - filtering both - name index helps here too. Since it has sufficiently high cardinality. Composite index wont help in case where ref_doctype isn't specfied. [skip ci] (cherry picked from commit 593626f) Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot
pushed a commit
that referenced
this pull request
Dec 13, 2022
## [14.10.1](v14.10.0...v14.10.1) (2022-12-13) ### Bug Fixes * `Enough Parts to Build` in `BOM Stock Report` ([3b9e9d2](3b9e9d2)) * `Material Request` reference in internal `Sales Order` ([416d178](416d178)) * add translation variable order ([ef933a8](ef933a8)) * Buying and selling check in pricing rule ([f5205a5](f5205a5)) * **ecommerce:** remove query parameters from referer ([40621b9](40621b9)) * handle_post_depr_entries_fail, show error alert and send email ([b661f57](b661f57)) * incorrect balance on parent company due to key mismatch ([436e93c](436e93c)) * index error on customer master ([02cc618](02cc618)) * Maintain Same Rate Throughout Sales Cycle doesn't work ([5398cf8](5398cf8)), closes [#32923](#32923) * order status in `Production Planning Report` ([a657db6](a657db6)) * Permission issue in Tax Detail report ([7a5b80d](7a5b80d)) * **pos:** variable typo: `s_pos` -> `is_pos` ([afbd48f](afbd48f)) * Reapply pricing rule on qty change ([c726c16](c726c16)) * Remove free items ([5e5937d](5e5937d)) * total value in Warehouse Wise Stock Balance ([c5a54d7](c5a54d7)) ### Performance Improvements * add indexes on payment entry reference (backport [#33288](#33288)) ([#33289](#33289)) ([ce63086](ce63086))
frappe-pr-bot
pushed a commit
that referenced
this pull request
Dec 13, 2022
## [13.42.4](v13.42.3...v13.42.4) (2022-12-13) ### Bug Fixes * `Enough Parts to Build` in `BOM Stock Report` ([50b2898](50b2898)) * `Material Request` reference in internal `Sales Order` ([988a327](988a327)) * incorrect balance on parent company due to key mismatch ([b17ac52](b17ac52)) * order status in `Production Planning Report` ([2880469](2880469)) ### Performance Improvements * add indexes on payment entry reference (backport [#33288](#33288)) ([#33290](#33290)) ([45f79ef](45f79ef))
developmentforpeople
pushed a commit
to Ayuda-Efectiva/erpnext
that referenced
this pull request
Jan 26, 2023
…rappe#33290) perf: add indexes on payment entry reference (frappe#33288) Adds index on: 1. reference doctype 2. reference name *Why not composite index?* There are three type of queries on this doctype - filtering ref_doctype - doctype index helps here - filtering ref_name - name index helps here - filtering both - name index helps here too. Since it has sufficiently high cardinality. Composite index wont help in case where ref_doctype isn't specfied. [skip ci] (cherry picked from commit 593626f) Co-authored-by: Ankush Menat <ankush@frappe.io>
developmentforpeople
pushed a commit
to Ayuda-Efectiva/erpnext
that referenced
this pull request
Jan 26, 2023
## [13.42.4](frappe/erpnext@v13.42.3...v13.42.4) (2022-12-13) ### Bug Fixes * `Enough Parts to Build` in `BOM Stock Report` ([50b2898](frappe@50b2898)) * `Material Request` reference in internal `Sales Order` ([988a327](frappe@988a327)) * incorrect balance on parent company due to key mismatch ([b17ac52](frappe@b17ac52)) * order status in `Production Planning Report` ([2880469](frappe@2880469)) ### Performance Improvements * add indexes on payment entry reference (backport [frappe#33288](frappe#33288)) ([frappe#33290](frappe#33290)) ([45f79ef](frappe@45f79ef))
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This table has no index right now. So most complex queries are doing full table scans! Example:
This PR Adds index on:
Why not composite index?
There are three type of queries on this doctype
high cardinality. Composite index wont help in case where ref_doctype
isn't specfied.