Skip to content

Instantly share code, notes, and snippets.

@lockefox
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lockefox/a19f81487166bb5a6b19 to your computer and use it in GitHub Desktop.
Save lockefox/a19f81487166bb5a6b19 to your computer and use it in GitHub Desktop.
Table for eve_central snapshots
DROP TABLE IF EXISTS `snapshot_evecentral`;
CREATE TABLE `snapshot_evecentral` (
`price_date` DATE NOT NULL,
`price_time` TIME NOT NULL,
`typeid` INT(8) NOT NULL,
`locationid` INT(8) NOT NULL,
`location_type` ENUM('solarsystemid','stationid','regionid','global') NULL,
`buy_sell` TINYINT(1) NOT NULL DEFAULT 0, -- 0=sell, 1=buy
`price_best` FLOAT(13,2) NULL, -- BUY_MAX, SELL_MIN
`price_avg` FLOAT(13,2) NULL,
`order_count` INT(8) NULL,
`order_volume` BIGINT(12) NULL,
PRIMARY KEY (price_date,price_time,typeid,locationid,buy_sell))
ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE INDEX price_spread ON snapshot_evecentral(price_date,typeid,locationid,buy_sell,price_best);
CREATE INDEX daily_volume ON snapshot_evecentral(price_date,typeid,locationid,buy_sell,order_volume);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment