When applied to a copy of the PINES database, it takes 18 seconds or so to retrieve the consolidated notes, alerts, and messages. This appears to be caused by the check for deleted='f' in the SQL query. For some reason, this is causing the query to do a sequential scan rather than an index scan. In testing, removing the check for deleted='f' solves the performance issue and returns the results immediately.
When applied to a copy of the PINES database, it takes 18 seconds or so to retrieve the consolidated notes, alerts, and messages. This appears to be caused by the check for deleted='f' in the SQL query. For some reason, this is causing the query to do a sequential scan rather than an index scan. In testing, removing the check for deleted='f' solves the performance issue and returns the results immediately.
IRC convo & pastebins showing the SQL results here: irc.evergreen- ils.org/ evergreen/ 2020-09- 10#i_457943
http://
Removing pullrequest for the moment, as the slow performance breaks the interface.