I would also suggest finding out exactly which table is using the most space.
That will tell you where to bother pruning data and where it’s not worth the 
trouble.

I use this query to see the size of the tables:


SELECT table_name AS 'Tables', 
round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' 
FROM information_schema.TABLES 
WHERE table_schema = 'pf' 
ORDER BY (data_length + index_length) DESC;


--
Louis Munro
lmu...@inverse.ca  ::  www.inverse.ca 
+1.514.447.4918 x125  :: +1 (866) 353-6153 x125
Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence 
(www.packetfence.org)

> On Oct 20, 2015, at 15:29 , Tim DeNike <tim.den...@mcc.edu> wrote:
> 
> The maintenance script, also shortening expiration times in configuration, 
> expiration.  Check to see how often your APs/switches are sending accounting 
> information.  If you can change them to space the accounting info out 
> further, it can be a big savings.
> 
> On Tue, Oct 20, 2015 at 2:58 PM, Pete Hoffswell <pete.hoffsw...@davenport.edu 
> <mailto:pete.hoffsw...@davenport.edu>> wrote:
> Just looking at my database... it's pretty big -
> 
> pf# mysql -u pf -p
> Enter password:
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> <snip>
> mysql> use pf
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
> 
> Database changed
> mysql> SELECT table_schema                                        "DB Name",
>     ->    Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in 
> MB"
>     -> FROM   information_schema.tables
>     -> GROUP  BY table_schema;
> +--------------------+---------------+
> | DB Name            | DB Size in MB |
> +--------------------+---------------+
> | information_schema |           0.0 |
> | pf                 |        8465.4 |
> +--------------------+---------------+
> 2 rows in set (1.07 sec)
> 
> mysql>
> 
> 
> 
> What's the best way to clean up the database of old data?  
> 
> addons/database-backup-and-maintenance.sh
> 
> ?
> 
> 
> 
> -
> Pete Hoffswell - Network Manager
> pete.hoffsw...@davenport.edu <mailto:pete.hoffsw...@davenport.edu> 
> http://www.davenport.edu <http://www.davenport.edu/>
> 
> 
> ------------------------------------------------------------------------------
> 
> _______________________________________________
> PacketFence-users mailing list
> PacketFence-users@lists.sourceforge.net 
> <mailto:PacketFence-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/packetfence-users 
> <https://lists.sourceforge.net/lists/listinfo/packetfence-users>
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> PacketFence-users mailing list
> PacketFence-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/packetfence-users

------------------------------------------------------------------------------
_______________________________________________
PacketFence-users mailing list
PacketFence-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to