Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041063Retail ModulesWeb POSpublic2019-06-10 17:042022-03-03 14:14
ALopetegui 
Retail 
normalmajorN/A
newopen 
5
 
 
No
0041063: Search of document Number has bad performance because the prefix is repeated in the number
iContains Searches of the document Number in webPos has bad performance on high volume environments

Above all if you search with the whole document number or with the prefix, because the GIN trigram index searches by group of three consecutive characters taken from a string and the document Number includes the terminal number and "0"s to complete it, therefore the prefix is very common.
More than 1 million of orders,
Same terminal prefix in the Document Number.
"0"s in the prefix to complete the documentNo with the same number of characters.

Compare results searching by
1- Complete number
2- First half numbers
3- Last half numbers

1 and 2 searches will be worse than 3.
We exposed the problem to 2nd quadrant and they told us that they see a design defect in the the document number, because there are 2 things to improve:

  1- Terminal Number prefix: This number should be in an other column, not included as prefix in the documentNo.

  2- several '0' to complete the document Number: This also makes a part of number very repetitive, creating more posibilites to trigram search in "000". This prefix should be removed.
No tags attached.
Issue History
2019-06-10 17:04ALopeteguiNew Issue
2019-06-10 17:04ALopeteguiAssigned To => adrianromero
2020-04-14 15:09marvintmProjectJava Client POS => Retail Modules
2020-04-14 15:09marvintmTriggers an Emergency Pack => No
2020-04-14 15:09marvintmCategory01 - General => Web POS
2022-03-03 14:14adrianromeroAssigned Toadrianromero => Retail

There are no notes attached to this issue.