Hi Thomas,

I notice that you've shortened the field size for all of the attribute 
values fields to 64 or 54 characters.  Any reason not to keep them at 253?

Some attributes like X-Ascend-Data-Filter, can require a longer field.

I like the tighter requirements otherwise.

Also, while I'm thinking about it, the new freeradius_tuning_guide from 
Kostas Kalevras, suggests:
"Create an index for the radacct table to minimize the penalty of a growing 
accounting table. The index should be for the UserName attribute with 
additional 
attributes:        AcctSessionId,AcctStartTime,AcctStopTime,NASIPAddres"

The distributed schema has each of these attributes as separate keys.

Should we change it to use:
KEY UserName (UserName,AcctSessionId,AcctStartTime,AcctStopTime,NASIPAddress)

or possibly:
KEY UserName (UserName),
KEY UserName2 (UserName,AcctSessionId,AcctStartTime,AcctStopTime,NASIPAddress)

I don't think I understand keys well enough to predict which would have the 
best performance, and don't have high enough load yet to properly test them 
directly.

Thanks.

At 10:38 AM 3/1/2002 +0100, you wrote:
>Since Attributes and Values not allowed to be NULL i've made the following
>mysql table structure. I've also raise the length of the
>username/attribues/value fields, because I think they was to short ;)
>
>
>#
># Table structure for table 'radacct'
>#
>
>CREATE TABLE radacct (
>   RadAcctId bigint(21) NOT NULL auto_increment,
>   AcctSessionId varchar(32) NOT NULL default '',
>   AcctUniqueId varchar(32) NOT NULL default '',
>   UserName varchar(64) NOT NULL default '',
>   Realm varchar(64) default '',
>   NASIPAddress varchar(15) NOT NULL default '',
>   NASPortId int(12) default NULL,
>   NASPortType varchar(32) default NULL,
>   AcctStartTime datetime NOT NULL default '0000-00-00 00:00:00',
>   AcctStopTime datetime NOT NULL default '0000-00-00 00:00:00',
>   AcctSessionTime int(12) default NULL,
>   AcctAuthentic varchar(32) default NULL,
>   ConnectInfo_start varchar(32) default NULL,
>   ConnectInfo_stop varchar(32) default NULL,
>   AcctInputOctets int(12) default NULL,
>   AcctOutputOctets int(12) default NULL,
>   CalledStationId varchar(10) NOT NULL default '',
>   CallingStationId varchar(10) NOT NULL default '',
>   AcctTerminateCause varchar(32) NOT NULL default '',
>   ServiceType varchar(32) default NULL,
>   FramedProtocol varchar(32) default NULL,
>   FramedIPAddress varchar(15) NOT NULL default '',
>   AcctStartDelay int(12) default NULL,
>   AcctStopDelay int(12) default NULL,
>   PRIMARY KEY  (RadAcctId),
>   KEY UserName (UserName),
>   KEY FramedIPAddress (FramedIPAddress),
>   KEY AcctSessionId (AcctSessionId),
>   KEY AcctUniqueId (AcctUniqueId),
>   KEY AcctStartTime (AcctStartTime),
>   KEY AcctStopTime (AcctStopTime),
>   KEY NASIPAddress (NASIPAddress)
>) ;
>
>#
># Table structure for table 'radcheck'
>#
>
>CREATE TABLE radcheck (
>   id int(11) unsigned NOT NULL auto_increment,
>   UserName varchar(64) NOT NULL default '',
>   Attribute varchar(32)  NOT NULL default '',
>   Value varchar(64) NOT NULL default '',
>   PRIMARY KEY  (id),
>   KEY UserName (UserName(32))
>) ;
>
>#
># Table structure for table 'radgroupcheck'
>#
>
>CREATE TABLE radgroupcheck (
>   id int(11) unsigned NOT NULL auto_increment,
>   GroupName varchar(64) NOT NULL default '',
>   Attribute varchar(32)  NOT NULL default '',
>   Value varchar(54)  NOT NULL default '',
>   PRIMARY KEY  (id),
>   KEY GroupName (GroupName(32))
>) ;
>
>#
># Table structure for table 'radgroupreply'
>#
>
>CREATE TABLE radgroupreply (
>   id int(11) unsigned NOT NULL auto_increment,
>   GroupName varchar(64) NOT NULL default '',
>   Attribute varchar(32)  NOT NULL default '',
>   Value varchar(64)  NOT NULL default '',
>   prio int unsigned NOT NULL default '0',
>   PRIMARY KEY  (id),
>   KEY GroupName (GroupName(32))
>) ;
>
>#
># Table structure for table 'radreply'
>#
>
>CREATE TABLE radreply (
>   id int(11) unsigned NOT NULL auto_increment,
>   UserName varchar(64) NOT NULL default '',
>   Attribute varchar(32) NOT NULL default '',
>   Value varchar(64) NOT NULL default '',
>   PRIMARY KEY  (id),
>   KEY UserName (UserName(32))
>) ;
>
>
>#
># Table structure for table 'usergroup'
>#
>
>CREATE TABLE usergroup (
>   id int(11) unsigned NOT NULL auto_increment,
>   UserName varchar(64) NOT NULL default '',
>   GroupName varchar(64) NOT NULL default '',
>   PRIMARY KEY  (id),
>   KEY UserName (UserName(32))
>) ;
>
>-
>List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Randy Moore
Axion Information Technologies, Inc.

email     [EMAIL PROTECTED]
phone   301-408-1200
fax        301-445-3947


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to