Project

General

Profile

Bug #11008

Performance issue at parsing the query string when it's buffer is part of a large dataset

Added by Eduard Soltan 7 months ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

History

#1 Updated by Eduard Soltan 7 months ago

Let's take the following example:

def temp-table tt field f1 as char.
def temp-table tt1 field f1 as char.
def temp-table tt2 field f1 as char.
def temp-table tt3 field f1 as char.

define dataset dtt1 for tt, tt1, tt2, tt3.

def var h as handle.

create query h.

h:add-buffer(buffer tt:handle).
h:query-prepare("for each tt where tt.f1 = 'abc'").
h:query-open().

When we reach DynamicQueryHelper.parse in order to parse the query string, because tt is part of a dataset, all of it's siblings are added in the query string and parsed together with the original query.

DEFINE BUFFER tt FOR TEMP-TABLE tt_tt_tt3.
DEFINE BUFFER tt1 FOR TEMP-TABLE tt1_tt_tt4.
DEFINE BUFFER tt2 FOR TEMP-TABLE tt2_tt_tt5.
DEFINE BUFFER tt3 FOR TEMP-TABLE tt3_tt_tt6.
OPEN QUERY DynGenQuery for each tt where tt.f1 = 'abc'

If we have a large dataset, this could cause a potential performance bottleneck.

Also available in: Atom PDF