mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Increased speed of loading syslog pages. (#6433)
* Increased speed of loading syslog pages. I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * moved schema 186->189
This commit is contained in:
committed by
Neil Lathwood
parent
6c555c6fb5
commit
6b2ae00e27
@@ -200,6 +200,7 @@ LibreNMS contributors:
|
||||
- Jonathan Price <jonathan@jonathanprice.uk> (Pricetx)
|
||||
- Remy de Boer <remy@slowpoke.nl> (remydb)
|
||||
- Ben Klang <ben@alkaloid.net> (bklang)
|
||||
- Tim Stallard <code@timstallard.me.uk> (TimStallard)
|
||||
- Svenn D'Hert <admin at svennd.be> (svennd)
|
||||
- Dominik Bay <db@rrbone.net> (eimann)
|
||||
- Nick Peelman <nick@peelman.us> (peelman)
|
||||
|
@@ -42,7 +42,7 @@ if ($_SESSION['userlevel'] >= '5') {
|
||||
$param = array_merge(array($_SESSION['user_id']), $param);
|
||||
}
|
||||
|
||||
$count_sql = "SELECT COUNT(timestamp) $sql";
|
||||
$count_sql = "SELECT COUNT(*) $sql";
|
||||
$total = dbFetchCell($count_sql, $param);
|
||||
if (empty($total)) {
|
||||
$total = 0;
|
||||
|
@@ -1454,6 +1454,7 @@ syslog:
|
||||
datetime: { Name: datetime, Columns: [timestamp], Unique: false, Type: BTREE }
|
||||
device_id: { Name: device_id, Columns: [device_id], Unique: false, Type: BTREE }
|
||||
program: { Name: program, Columns: [program], Unique: false, Type: BTREE }
|
||||
priority_level: { Name: priority_level, Columns: [priority, level], Unique: false, Type: BTREE }
|
||||
tnmsneinfo:
|
||||
Columns:
|
||||
device_id: { Field: device_id, Type: int(11), 'Null': false, Default: null, Extra: '' }
|
||||
|
1
sql-schema/189.sql
Normal file
1
sql-schema/189.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE syslog ADD INDEX priority_level (priority, level);
|
Reference in New Issue
Block a user