Page 1 of 1

dpQuery of large amounts of data

Posted: Tue Jun 23, 2020 12:32 pm
by NikolayLevchenko
Hi,

I am trying to collect "configuration" data from my project's database (for maintenance activities).
For example, I want to collect all sumalerts to check that they are configured correctly. It's is very quick and easy to do with smth like:

Code: Select all

string sQuery = "SELECT '_alert_hdl.._type', " +
                      "'_alert_hdl.._active', " +
                      "'_alert_hdl.._class', " +
                      "'_alert_hdl.._text0', " +
                      "'_alert_hdl.._text1', "  +
                      "'_alert_hdl.._panel', " +
                      "'_alert_hdl.._panel_param', " +
                      "'_alert_hdl.._help', " +
                      "'_alert_hdl.._ack_has_prio', " +
                      "'_alert_hdl.._order', " +
                      "'_alert_hdl.._dp_list', " +
                      "'_alert_hdl.._dp_pattern', " +
                      "'_alert_hdl.._filter_threshold', " +
                      "'_alert_hdl.._prio_pattern', " +
                      "'_alert_hdl.._abbr_pattern', " +
                      "'_alert_hdl.._ack_deletes', " +
                      "'_alert_hdl.._non_ack', " +
                      "'_alert_hdl.._came_ack', " +
                      "'_alert_hdl.._pair_ack', " +
                      "'_alert_hdl.._both_ack' " +
                      "FROM '*.**' WHERE '_alert_hdl.._type' == " + DPCONFIG_SUM_ALERT;
  
      dyn_dyn_anytype ddaAlertHdlList;
      dpQuery(sQuery, ddaAlertHdlList);
This works very nice and VERY quick... until my project becomes a little larger and I start getting errors like:

Code: Select all

WCCILevent   (0), 2020.06.23 12:18:14.626, PARAM,WARNING,    54, Unexpected state, EvQueryList, doQuery, Too many rows, query aborted, SELECT '_alert_hdl.._type', '_alert_hdl.._active', '_alert_hdl.._class', '_alert_hdl.._text0', '_alert_hdl.._text1', '_alert_hdl.._panel', '_alert_hdl.._panel_param', '_alert_hdl.._help', '_alert_hdl.._ack_has_prio', '_alert_hdl.._order', '_alert_hdl.._dp_list', '_alert_hdl.._dp_pattern', '_alert_hdl.._filter_threshold', '_alert_hdl.._prio_pattern', '_alert_hdl.._abbr_pattern', '_alert_hdl.._ack_deletes', '_alert_hdl.._non_ack', '_alert_hdl.._came_ack', '_alert_hdl.._pair_ack', '_alert_hdl.._both_ack' FROM '*.**' WHERE '_alert_hdl.._type' == 59
WCCOAui      (1), 2020.06.23 12:18:14.628, PARAM,SEVERE,     54, Unexpected state, Query not successful: Too many values
I found that I can "fix" this by setting "maxValueRequestCount = 0" in my "config" file [event] section.
But this bugs me for 2 reasons:
1. If I leave this setting there, my project in "runtime" can be vulnerable to overloads.
2. If I only use this setting when I need to get the data, I have to re-start event manager every time, which is not acceptable in production.

So, is it possible to change "maxValueRequestCount" without re-starting event manager? Or only apply this setting to my UI manager and not ALL managers?

Re: dpQuery of large amounts of data

Posted: Tue Jun 23, 2020 2:04 pm
by mkerk
HI,
NO, it´s not possible to change this configuration for the EVENT manager without restarting it.
Please don´t use the value 0 for this configuration. Try to calculate an appropriate value for your application . (maxValueRequestCount = (number of rows x number of columns).
Just an info: for histrocial queries, there is also the same config- entry but for the DATA-manager. this setting for the DATA manager can also be changed via an internal DPE "_Config.MaxValueRequestCount"; in this case it´s not necessary to restart the DATA-manager.

BR,
Mousser.