Search and Reports page display speed up
Posted: 17 May 2017 08:31
I noticed that mailwatch has added an interesting feature. Under the "Search and Reports" it now displays a section called "Statistics" with oldest, newest and a message count of the currently applied filter (if applied) or all the messages (if no filter).
As interesting as it is, my database is slow, so loading this page adds a few of seconds to the load time, so I've removed it.
To do so, I've edited /var/www/html/mailscanner/filter.inc.php and commented out the lines 170 to 186 using /* */, like so:
It's useful for me, but not useful enough to make any fuss about it.
If someone else is interested in it, here it is.
As interesting as it is, my database is slow, so loading this page adds a few of seconds to the load time, so I've removed it.
To do so, I've edited /var/www/html/mailscanner/filter.inc.php and commented out the lines 170 to 186 using /* */, like so:
Code: Select all
170 /* echo ' <tr><th colspan="2">' . __('stats09') . '</th></tr>' . "\n";
171 $query = "
172 SELECT
173 DATE_FORMAT(MIN(date),'" . DATE_FORMAT . "') AS oldest,
174 DATE_FORMAT(MAX(date),'" . DATE_FORMAT . "') AS newest,
175 COUNT(date) AS messages
176 FROM
177 maillog
178 WHERE
179 1=1
180 " . $this->CreateSQL();
181 $sth = dbquery($query);
182 while ($row = $sth->fetch_object()) {
183 echo ' <tr><td>' . __('oldrecord09') . '</td><td align="right">' . $row->oldest . '</td></tr>' . "\n";
184 echo ' <tr><td>' . __('newrecord09') . '</td><td align="right">' . $row->newest . '</td></tr>' . "\n";
185 echo ' <tr><td>' . __('messagecount09') . '</td><td align="right">' . number_format($row->messages) . '</td></tr>' . "\n";
186 } */
If someone else is interested in it, here it is.