Adding indexes with the hope to increase performance in /stats.
This commit is contained in:
parent
c50df91a5a
commit
cfcc08c479
|
@ -28,6 +28,7 @@ sub MIGRATIONS {
|
||||||
'ALTER TABLE paths ADD column last_seen TIMESTAMP;',
|
'ALTER TABLE paths ADD column last_seen TIMESTAMP;',
|
||||||
'ALTER TABLE paths ALTER COLUMN last_seen SET DEFAULT NOW();',
|
'ALTER TABLE paths ALTER COLUMN last_seen SET DEFAULT NOW();',
|
||||||
'ALTER TABLE requests ADD PRIMARY KEY (uuid)',
|
'ALTER TABLE requests ADD PRIMARY KEY (uuid)',
|
||||||
|
'CREATE INDEX request_extra_index on requests (date, path);',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
1;
|
1;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
% layout 'stats';
|
% layout 'stats';
|
||||||
|
% my $base_url = config 'base_url';
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<h2>Stats</h2>
|
<h2>Stats</h2>
|
||||||
|
|
||||||
|
@ -14,7 +15,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
% for my $row (@$tracking_by_url) {
|
% for my $row (@$tracking_by_url) {
|
||||||
<tr>
|
<tr>
|
||||||
<td><%=$row->{path}%></td>
|
<td><%="${base_url}$row->{path}"%></td>
|
||||||
<td><%=$row->{unique_ips_last_24_hours}%></td>
|
<td><%=$row->{unique_ips_last_24_hours}%></td>
|
||||||
<td><%=$row->{unique_ips_last_week}%></td>
|
<td><%=$row->{unique_ips_last_week}%></td>
|
||||||
<td><%=$row->{unique_ips_last_month}%></td>
|
<td><%=$row->{unique_ips_last_month}%></td>
|
||||||
|
|
Loading…
Reference in New Issue