Repository navigation
[IMP] partner_internal_code: trigram index on internal_code behind a feature flag - #161
Open
fw-bot-adhoc wants to merge 1 commit into
Open
fw-bot-adhoc wants to merge 1 commit into
fw-bot-adhoc wants to merge 1 commit into
Conversation
…feature flag - Create a gin trigram index on unaccent(internal_code) from init(), so ILIKE '%term%' on the field stops scanning the whole table (it is one of the smart search fields of base_name_search_improved) - Use an own index name next to the btree of the field: declaring index="trigram" would make the registry drop the btree and rebuild it as gin without CONCURRENTLY, and the btree serves "=" and the unique check - Only create it when the system parameter saas_feature.partner_search_trigram_index is on, the same flag as the base_ux partner search indexes; it is built on the next -u of the module - Skip creation when pg_trgm is missing or unaccent is not IMMUTABLE - Bump version to 18.0.1.1.0 Change note: Búsqueda de contactos por código interno más rápida en bases con muchos contactos (se habilita por base) X-original-commit: 44d6928
Author
|
@maq-adhoc @az-adhoc cherrypicking of pull request #160 failed. stdout: Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Tarea: https://www.adhoc.inc/odoo/project.task/79487
Qué cambia
Complemento de ingadhoc/miscellaneous#505 (
base_ux). Cuandointernal_codeestá en los campos de búsqueda debase_name_search_improved, cada pasada del módulo haceunaccent(internal_code) ILIKE '%texto%', y el campo solo tiene btree: recorre la tabla entera.partner_internal_codecrea desdeinit()un índice gin de trigramas eninternal_code(res_partner__internal_code_trgm_index), con el mismo patrón quebase_ux:index="trigram"haría que el registry borre el btree y lo recree como gin sinCONCURRENTLY; el btree sirve el=y el control de unicidad.saas_feature.partner_search_trigram_indexprendido, en el próximo-udel módulo.pg_trgmo conunaccentno IMMUTABLE no se crea nada (log eninfo).Medición
Copia de una base 18.0 con 272k contactos y
internal_codecomo campo de búsqueda, con los índices debase_uxya creados.name_search(limit=8):internal_codeinternal_code)Crear el índice: 2,4 s, 5,8 MB.
Forward-Port-Of: #160