This page describes some of the important tables used by FireStats.
Hit table (firestats_hits)
The hits table holds recent hits, one row for each hit.
|id||Primary key of this table. an auto incrementing unique id|
|ip_int1||The first 64 bits of the IP address in an int format. since FireStats supports ipv6 128 bits are required to hold each ip address|
|ip_int2||The second 64 bits of the IP address in an int format|
|timestamp||Timestamp of the hit, when it was recorded|
|url_id||The ID of the hit URL in the urls table (firestats_urls)|
|url_site_id||The Site ID of url (To which site monitored by FireStats the url belongs|
|referer_id||The Referer URL id in the urls table (firestats_urls)|
|useragent_id||The UserAgent ID in the Useragents table ((firestats_useragents)|
|country_code||2 bytes country code of IP address or NULL if unknown|
|excluded_ip||1 if this row is excluded by IP address, 0 otherwise|
URLs table (firestats_urls)
The urls table holds all the urls and referrer information :
|id||URL id, referenced from other tables|
|url||URL text as a binary blob|
|site_id||The site_id this url belongs to|
|md5||url md5 checksum, used for indexing purposes|
|host||url hostname. for http://firestats.cc/wiki that would be firestats.cc|
|search_engine_id||The ID of the search engine this url is from or NULL if not from a search engine|
|search_terms||Search terms in this url, if from a search engine or NULL for none|
|title||The title of the page referenced by this url. currently only for WordPress posts and pages of monitored blogs|
|type||URL Type, currently supported types: FS_URL_TYPE_POST=1 - WordPress post or page. FS_URL_TYPE_RSS=2 - RSS page|
|add_time||The time this url was first added to FireStats|
|matching_exclude_patterns||1 if url matches a url excluding pattern, 0 otherwise|
Useragents table (firestats_useragents)
The useragents table hold all the useragents (firestats_useragents)
|id||Useragent ID, referenced from other tables|
|useragent||Useragent text as a binary blob|
|md5||Useragent md5 checksum, used for indexing purposes|
|match_bots||1 if useragent matches a useragent excluding pattern, 0 otherwise|
FireStats archive tables
After a time defined by the user, FireStats convert hits in the hits table into a more compact form and store them in the archive ables.
Ranges table (firestats_archive_ranges)
The ranges table define the archive ranges. each range has an id, a beginning and end time and is referenced by the other archive tables to specify that some data was collected in this range. currently ranges are always of one day, but this may change in the future.
|range_start||Start time of this range|
|range_end||End time of this range|
Archive tables are pretty much self explanatory, and are all similar. each row in the table have a range_id. the range_id represents a start and end time for this range in the firestats_archive_ranges table. the rest of the information in the row is the number of X happened in that range, where X is obvious from the table name and from the column name. for example, firestats_archive_countries holds page views and visits from each country in each time range.
If you want documentation of any other tables, please create an enhancement request.