Difference between revisions of "Database Table: site stats"

From Dreamwidth Notes
Jump to: navigation, search
(Created page with '{{Database Table|name=site_stats|table type=global}} Category:Database Tables Needing Description = Definition = <source lang="sql"> CREATE TABLE site_stats ( category_id…')
(No difference)

Revision as of 12:40, 27 January 2010

"{{{repo}}}" is not in the list of possible values (dw-free, dw-nonfree) for this property. This is a global table.

Definition

CREATE TABLE site_stats (
    category_id INT UNSIGNED NOT NULL,
    key_id INT UNSIGNED NOT NULL,
    insert_time INT UNSIGNED NOT NULL,
    VALUE INT UNSIGNED NOT NULL,
 
    -- FIXME: This is good for retrieving data for a single category+key, but
    -- maybe not as good if we want all keys for the category, with a limit on
    -- time (ie, last 5 entries, or last 2 weeks). Do we need an extra index?
    INDEX (category_id, key_id, insert_time) 
)

Relationships