Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
iDempiere JIRA
Query class to accept a list of columns to select
Description
issue:
REST uses the Query class from core - which returns complete PO objects - the Query class doesn't filter columns
use case: get columns a,b,c with rest $select operator - the view behind has 100 columns - includes sub-queries with aggregation - we are wondering. 1. sql cost with 3 cols 30ms same with intensive column costs 7 sec. so believe REST api processed only requested 3 columns, instead it make huge query against database, for 100 cols, convert them then drop-return to rest client 3 columns with 100 columns processing costs.
issue:
REST uses the Query class from core - which returns complete PO objects - the Query class doesn't filter columns
use case: get columns a,b,c with rest $select operator - the view behind has 100 columns - includes sub-queries with aggregation - we are wondering. 1. sql cost with 3 cols 30ms same with intensive column costs 7 sec. so believe REST api processed only requested 3 columns, instead it make huge query against database, for 100 cols, convert them then drop-return to rest client 3 columns with 100 columns processing costs.
related discussion
https://mattermost.idempiere.org/idempiere/pl/38jrkdjpqifoiryhp8jmzzwnwr
Carlos: think it could be possible changing the Query core class to accept a list of columns to select
Hengsin: we would have to modify the Query class to be able to return partial result. and then use it in the Rest $select implementation
Phases
A. change core
B. apply to rest