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 ALTER COLUMN last_seen SET DEFAULT NOW();',
|
||||
'ALTER TABLE requests ADD PRIMARY KEY (uuid)',
|
||||
'CREATE INDEX request_extra_index on requests (date, path);',
|
||||
);
|
||||
}
|
||||
1;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
% layout 'stats';
|
||||
% my $base_url = config 'base_url';
|
||||
<div class="description">
|
||||
<h2>Stats</h2>
|
||||
|
||||
|
@ -14,7 +15,7 @@
|
|||
</tr>
|
||||
% for my $row (@$tracking_by_url) {
|
||||
<tr>
|
||||
<td><%=$row->{path}%></td>
|
||||
<td><%="${base_url}$row->{path}"%></td>
|
||||
<td><%=$row->{unique_ips_last_24_hours}%></td>
|
||||
<td><%=$row->{unique_ips_last_week}%></td>
|
||||
<td><%=$row->{unique_ips_last_month}%></td>
|
||||
|
|
Loading…
Reference in New Issue