- 快召唤伙伴们来围观吧
- 微博 QQ QQ空间 贴吧
- 文档嵌入链接
- 复制
- 微信扫一扫分享
- 已成功复制到剪贴板
Internet of things
在本演示中,我将讨论1。在MySQL2上使用物联网(IOT)。在mysql和mongodb中存储时间序列数据。我将在mysql和mongobd中进行使用物联网传感器和存储时间序列数据的现场演示(我还将演示世界上最小的mysql服务器)。之后,我将讨论如何在MySQL中存储时间序列,以及典型的挑战(即如何有效地存储原始度量)和数据优化技术:针对写入或选择、摘要表等进行优化。我们将讨论将时间序列数据存储为经典关系表(名称值或值作为字段)以及将其存储为MySQL5.7中的JSON对象。
展开查看详情
1 .
2 . About Me Alexander Rubin, Principal Architect, Percona • Working with MySQL for over 10 years – Started at MySQL AB, Sun Microsystems, Oracle (MySQL ConsulDng) – Joined Percona in 2013
3 .
4 . Level of Light Every plant comes with one – a liOle plasDc label tucked into the pot with an icon on it that lets you know what level of light it needs.
5 .Cost ($35 +) Size Need to add Wifi module
6 .Particle Photon $19 hOps://store.parDcle.io
7 .Intel Edison ~$60 hOp://www.intel.com/ content/www/us/en/ do-it-yourself/ edison.html
8 .WiFi Module - ESP8266 $6 hOps:// www.sparkfun.com/ products/13678
9 .Particle Demo…
10 .Demo Recap… 100% Cloud IoT
11 .console.parDcle.io
12 .Measurement Results…
13 . Storing data in MySQL: wide table CREATE TABLE `sensor_wide` ( `id` int(11) NOT NULL AUTO_INCREMENT, `light` int(11) DEFAULT NULL, `temp` double DEFAULT NULL, `humidity` double DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 + Storage is good - Alter table is a hard, not flexible
14 . Storing data in MySQL: key/value CREATE TABLE `cloud_data` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `data` varchar(255) DEFAULT NULL, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=11106 DEFAULT CHARSET=latin1 + Flexible - High overhead on storage
15 . Storing data in MySQL 5.7: JSON store CREATE TABLE `event_stream_json` ( `doc` json DEFAULT NULL, `_id` varchar(32) GENERATED ALWAYS AS (json_unquote(json_extract(`doc`,'$._id'))) STORED NOT NULL, `name` varchar(255) GENERATED ALWAYS AS (json_unquote(json_extract(`doc`,'$.name'))) VIRTUAL, UNIQUE KEY `_id` (`_id`), KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 + Very Flexible + indexes - Some overhead on storage
16 .Edison Demo…
17 .
18 .http://bugs.mysql.com/bug.php?id=2 [12 Sep 2002 5:26] Mark Matthews Description: Other JDBC drivers I have used make toast for breakfast. MySQL Connector/J doesn't make toast, it can only pour a bowl of froot loops. When I ask it to make toast, the "NoToast" exception is thrown. I think you should look into this.
19 .Fixing MySQL Bug#2
20 .
21 .
22 .Bug fixed, please enjoy your MySQL toast...