I had the problem that the nightly db cleanup took more than 4 hours after
upgrading from 0.94 to 0.96-cvs (~10 minutes before).
One part of the solution was a change of the sql statement in db_clean.
This saved ~1 hour of time. The main time was saved with an full vacuum of
the netdisco db. auto vacuum is enabled, and I've no idea why it was not
working effective. Maybe because I migrated the db dump from psql 7.4 to
8.1.
[...]
print " Deleting nodes that are actually device ports...\n";
# arcanez/IRC channel / RG
# DELETE FROM node WHERE mac IN (select mac from device_port union
select mac from device);
#my $num = sql_do(q/DELETE FROM node WHERE mac IN (select mac from
device_port)
# OR mac IN (select mac from device)/);
my $num = sql_do(q/DELETE FROM node WHERE mac IN (select mac from
device_port union select mac from device)/);
print " $num MAC entries deleted\n";
# arcanez/IRC
#$num = sql_do(q/DELETE FROM node_ip WHERE mac IN (select mac from
device_port)
# OR mac IN (select mac from device)/);
$num = sql_do(q/DELETE FROM node_ip WHERE mac IN (select mac from
device_port union select mac from device)/);
[...]
Nobody/Anonymous
Back-End
1.0
Public
|
Date: 2007-06-19 21:39
|
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2007-06-19 21:39 | fenner |
| resolution_id | None | 2007-06-19 21:39 | fenner |
| close_date | - | 2007-06-19 21:39 | fenner |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use