Product and Business Partner High Volume ignored when more then 500 records

Description

problem: I setup IsHighVolume=N for tables c_bpartner and m_product. This setup is not considered when opening Business Partner and Product. Means windows opening with filter record window. i want open it simple without filter record. This problem appear when more then 500 records in the system across all clients.

forum thread: https://groups.google.com/forum/#!topic/idempiere/_cZSOvpMdv0

steps to reproduce
1. set up IsHighVolume=N for tables c_bpartner and m_product
2. import more then 500 products
3. login as regular user, IsHighVolume=N ignored BUG

Environment

2.1.0.v20141105-2246

Activity

Show:
Tomáš Švikruha
November 18, 2014, 8:37 AM

BUG 1: Method initialQuery in classes AbstractADWindowContent and APanel includes SQL query to get count of records. There is missing condition for Client.
BUG 2: Method getConfirmQueryRecords of class MRole contains hard coded value for default ConfirmQueryRecords - this could be replaced by System Configurator Value.

I fixed this bugs. Default Confirm Query records can be set as System Configurator with Name DEFAULT_ROLE_CONFIRM_QUERY_RECORDS. Without this variable, default is still 500 records.

But you can also fix your use case without java patch. You have to set MaxQueryRecords=0 and ConfirmQueryRecords as value bigger than number of products or partners on all clients (i think this is not the best way)

Tomáš Švikruha
November 18, 2014, 8:49 AM

Patch 01 fixes missing AD_Client_ID parameter
Patch 02 replaces hard coded value by system config value (DEFAULT_ROLE_CONFIRM_QUERY_RECORDS)

Carlos Ruiz
November 19, 2014, 4:24 PM

I'm not so sure about the convenience of filtering by AD_Client_ID

Usually the confirmation of query is related to performance, to avoid a user to slow down the server with a query travelling many records.
And usually (by default) the AD_Client_ID is not indexed in iDempiere tables, and is not 100% recommendable to have an access index by AD_Client_ID because of its usually low cardinality.

So, I think the intention of opening the query window if the count is > 500 - even in other tenants - is to avoid traveling with a possible sequential scan a big table.
It seems weird to open a find window for a table that maybe it has just one record for a tenant - but thinking about performance it makes sense.

Norbert Bede
November 19, 2014, 6:56 PM

My opinion is HighVolume has also another functional feature in such cases better to start window always with high performance not with simple window. (dedicated tole to heavy document entry...orders). IMHO would be nice to get it to window customisation too...low prio but prefer it well.

Then i can setup for all default IsHighVolume=N - because much easier for beginner users and new customer presentation then i can limit client(customer) with really high volume data with window customisation. (not sure in this scenario we should have benefit from AD_Client_ID)

maybe off-topic just i'm quite curious: but from consultant position thinking - window pagination is influence performance ? (limit query or not). e.g. first load only visible rows - with all required columns then count number of records/paginationsettings...etc. when move to another page then load records again..

Assignee

Tomáš Švikruha

Reporter

Norbert Bede

Labels

None

Tested By

None

Affects versions

Due date

2014/11/18

Priority

Major
Configure