This questions is a db design/optimization question. We're going to start off with some background. At UCB users connect to the campus wifi system via an access point. Connecting to an access point creates a wifi_accounting event. Throughout a user's time on wifi, wifi_accounting events will continue be created every 5-30 seconds. On average, we get about 20 million such events per day.
The following table represents the data we capture for each wifi_accounting event:
wifi_accounting
------------------------------
ip INET
username VARCHAR
mac MACADDR