ClickHouse 是什么

ClickHouse 是一个开源的面向联机分析处理(OLAP, On-Line Analytical Processing) 的列式存储数据库管理系统。

  • 在一个 "常规" 的行式数据库管理系统中,数据按下面的顺序存储:
    id | name | age
    ---|---|---
    1| Zhangsan | 18
    2| GlonHo | 20
    3| Lisi | 22
    ...|...|...

换言之,所有相关的值在一个行里面一个挨一个存储。行式存储的的数据库管理系统有:MySQL, Postgres, MS SQL Server 等。

  • 在一个列式存储数据库管理系统中,数据存储的方式如下所示:

    1. id: 1 2 3 ...
    2. name: Zhangsan GlonHo Lisi ...
    3. age: 18 20 22 ...

列式存储的数据库管理系统更适合于 OLAP 场景(对于大多数查询,至少有 100 倍的处理速度提升)的原因有:

  1. I/O 方面:
  • 对于一个分析的查询,只需要表中少量的列。在一个列式存储数据库管理系统中,可以只读取你需要的数据。例如,如果你只需要从 100 列中读取 5 列,那么预期可以减少 20倍 I/O
  • 列式存储数据,更易于压缩,进一步减少 I/O
  • 由于减少了 I/O,系统中可以缓存更多符合要求的数据
  1. CPU 方面:

ClickHouse 独有特性

  1. 列式存储
  2. 数据压缩

不是所有的列式存储数据管理系统都会进行数据压缩,如:InfiniDB CE 和 MonetDB。然而,数据压缩真的提高了性能

  1. 支持磁盘存储数据

一些列式存储数据管理系统只能在 RAM(Random Access Memory)上面工作,如:SAP HANA 和 Google PowerDrill。但是对于海量数据,RAM 的成本太大了。

  1. 多核并行处理
  2. 分布式处理
  3. 类 SQL 支持

支持非标准 SQL。
不支持 NULL,不支持相关子查询,支持 JOIN,支持在 FROM、IN、 JOIN 子句中的子查询和标量子查询。

  1. Vector 引擎

不止以列的形式存储数据,部分列还经过向量处理。这样能取得高 CPU 性能。

  1. 数据实时更新

ClickHouse支持主键表。为了迅速查询某个范围内的主键,数据使用合并树增量地进行排序。因此,数据可以不断被添加到表中,添加数据时没有加锁。

  1. 索引

允许有一个主键,

  1. 适用于在线查询

这使得 ClickHouse 可以用作 Web 系统的后端。低延时意味着查询可以被及时处理。

  1. 支持近似计算
  2. 支持嵌套的数据结构,支持数组
  3. 支持限制查询的复杂性

  4. 复制和支持复制节点的数据完整性

使用多主节点复制。数据被写入任何可用的复制节点后,分发给其他的复制节点。系统在不同的复制节点中维护相同的数据。在出现失败之后,数据会自动回复,或者在复杂的情况下使用一个 "按钮"。Data replication

入门指南

系统要求

ClickHouse 不是一个跨平台的系统,它要求 Linux Ubuntu 12.04 或更新版本,支持带有 4.2 SSE 指令集的 x86_64 架构。

检查是否支持 4.2 SSE 指令集:

  1. grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not supported"

推荐使用 Ubuntu 系统,连接终端必须是 UTF-8 编码(Ubuntu 默认是 UTF-8)。

安装

用系统安装包的方式

/etc/apt/sources.list 或者一个单独的 /etc/apt/sources.list.d/clickhouse.list 文件中添加 repository:

在 Ubuntu Trusty (14.04):

  1. deb http://repo.yandex.ru/clickhouse/trusty stable main

对于其他 Ubuntu 版本,把替换 trusty 成 xenial 或者 precise。

然后执行:

  1. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4 # optional
  2. sudo apt-get update
  3. sudo apt-get install clickhouse-client clickhouse-server-common

也可以手动下载安装包:

http://repo.yandex.ru/clickhouse/trusty/pool/main/c/clickhouse/

http://repo.yandex.ru/clickhouse/xenial/pool/main/c/clickhouse/

http://repo.yandex.ru/clickhouse/precise/pool/main/c/clickhouse/

ClickHouse 包含访问限制设置,设置在 users.xml 文件中(和 config.xml 放在一起)。

默认情况下,允许自任何地方的默认用户无密码的访问。

用源码安装

Linux 平台跟着 build.md 中的介绍进行 build,Mac OS X 则跟着 build_osx.md 进行 build。

你可以编译包然后安装,也可以不安装。

  • Client: src/dbms/src/Client/
  • Server: src/dbms/src/Server/

对于 Server,创建一个数据目录,如:

  1. /var/lib/clickhouse/data/default/
  2. /var/lib/clickhouse/metadata/default/

在 server config 中配置,然后给所需用户 chown 分配权限。

注意:服务器配置的路径是:src/dbms/src/Server/config.xml

其他安装方式

Docker image: https://hub.docker.com/r/yandex/clickhouse-server/

Gentoo: https://github.com/kmeaw/clickhouse-overlay

运行

以守护进程(daemon)的方式启动服务:

  1. sudo service clickhouse-server start

日志目录:

  1. /var/log/clickhouse-server/

如果启动失败,检查配置文件:

  1. /etc/clickhouse-server/config.xml

还可以在控制台启动服务:

  1. clickhouse-server --config-file=/etc/clickhouse-server/config.xml

在这种情况下,日志会输出到控制台,这在开发的时候还是挺方便的。如果配置文件就在当前目录(即与 clickhouse-server 同一目录),无需使用参数 --config-file,默认读取 ./config-file。

可以使用命令行客户端来连接服务:

  1. clickhouse-client

clickhouse-client 参数介绍:

  • --host, -h:目标服务器名,默认为 localhost
  • --port:目标端口,默认为 9000
  • --user, -u:连接用户,默认为 default
  • --password:连接用户密码,默认为空字符串
  • --query, -q:非交互模式下执行的命令
  • --database, -d:当前操作的数据库,默认选择配置文件配置的值(默认为 default 库)
  • --multiline, -m:如果设定,允许多行查询
  • --multiquery, -n:如果指定,允许处理由分号分隔的多个查询。只有在非交互式模式工作。
  • --format, -f:使用指定的默认格式输出结果
  • --vertical, -E:如果指定,默认使用垂直格式输出结果,等同于 --format=Vertical。在这种格式中,每个值可在单独的行上,显示宽表时很有用。
  • --time, -t:如果指定,在 stderr 中输出查询执行时间的非交互式模式下。
  • --stacktrace:如果指定,如果发生异常,也会输出堆栈跟踪。
  • --config-file:配置文件的名称,额外的设置或改变了上面列出的设置默认值。

默认情况下,配置文件的搜索顺序如下:

  • ./clickhouse-client.xml
  • ~/.clickhouse-client/config.xml
  • /etc/clickhouse-client/config.xml

如果三个文件同时存在N个,则以找到的第一个配置文件为准。

这个客户端还可以连接到一个远程服务端:

  1. clickhouse-client --host=example.com

还可以指定将用于处理查询的任何设置,如:clickhouse-client --max_threads=1,表示查询处理线程的最大数量为 1。

检查系统:

  1. root@GlonHo:~# clickhouse-client
  2. ClickHouse client version 1.1.54198.
  3. Connecting to localhost:9000.
  4. Connected to ClickHouse server version 1.1.54198.
  5. :)
  6. :) select 1
  7. SELECT 1
  8. ┌─1─┐
  9. 1
  10. └───┘
  11. 1 rows in set. Elapsed: 0.023 sec.
  12. :)

恭喜你,it works!

测试数据

如果你是 Yandex 的员工,你可以使用 Yandex.Metrica 的测试数据来探索系统的功能和性能,你在这里可以找到如何使用测试数据的介绍。另外,你可以使用一个公开的可用的数据集,看这里

如果你有疑问

如果你是 Yandex 的员工,你可以使用 ClickHouse 内部邮件列表,你可以订阅这个列表来获取公告、新的发展信息和其他用户的问题。

另外,你可以在 Stack Overflow 上提问,在 [Google Groups] 上讨论,或者发邮件到开发者邮箱:clickhouse-feedback@yandex-team.com

最后

ClickHouse 目前官方只支持 Ubuntu,对于 RedHat 并没有什么描述。在 CentOS 6.9 上编译安装的时候,特别麻烦,最后放弃了,后来在官方的 Google Groups 上找到一个 RedHat 的包安装方式(或者直接到 GitHub),但还是找不到对应版本的依赖,搜了一下,可能需要重新编译内核,也就放弃了。最终找了个 Ubuntu 14.04 LTS 来做的实验。

CentOS:

  1. [root@GlonHo ~]# grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not supported"
  2. SSE 4.2 supported
  3. [root@GlonHo ~]# yum-config-manager --add-repo http://repo.red-soft.biz/repos/clickhouse/repo/clickhouse-el6.repo
  4. bash: yum-config-manager: command not found
  5. [root@GlonHo ~]# yum -y install yum-utils
  6. ...
  7. [root@GlonHo ~]# yum-config-manager --add-repo http://repo.red-soft.biz/repos/clickhouse/repo/clickhouse-el6.repo
  8. Loaded plugins: fastestmirror
  9. adding repo from: http://repo.red-soft.biz/repos/clickhouse/repo/clickhouse-el6.repo
  10. grabbing file http://repo.red-soft.biz/repos/clickhouse/repo/clickhouse-el6.repo to /etc/yum.repos.d/clickhouse-el6.repo
  11. clickhouse-el6.repo | 165 B 00:00
  12. repo saved to /etc/yum.repos.d/clickhouse-el6.repo
  13. [root@GlonHo ~]# yum install clickhouse-server clickhouse-client clickhouse-server-common clickhouse-compressor -y
  14. Loaded plugins: fastestmirror
  15. Setting up Install Process
  16. Loading mirror speeds from cached hostfile
  17. * base: mirrors.zju.edu.cn
  18. * epel: mirrors.tuna.tsinghua.edu.cn
  19. * extras: mirrors.zju.edu.cn
  20. * updates: mirrors.163.com
  21. base | 3.7 kB 00:00
  22. clickhouse | 2.9 kB 00:02
  23. extras | 3.4 kB 00:00
  24. updates | 3.4 kB 00:00
  25. Package clickhouse-server-common-1.1.54198-3.el6.x86_64 already installed and latest version
  26. Package clickhouse-compressor-1.1.54198-3.el6.x86_64 already installed and latest version
  27. Resolving Dependencies
  28. --> Running transaction check
  29. ---> Package clickhouse-client.x86_64 0:1.1.54198-3.el6 will be installed
  30. ---> Package clickhouse-server.x86_64 0:1.1.54198-3.el6 will be installed
  31. --> Processing Dependency: libbfd-2.20.51.0.2-5.44.el6.so()(64bit) for package: clickhouse-server-1.1.54198-3.el6.x86_64
  32. --> Finished Dependency Resolution
  33. Error: Package: clickhouse-server-1.1.54198-3.el6.x86_64 (clickhouse)
  34. Requires: libbfd-2.20.51.0.2-5.44.el6.so()(64bit)
  35. You could try using --skip-broken to work around the problem
  36. You could try running: rpm -Va --nofiles --nodigest

Ubuntu:

  1. root@GlonHo:~# grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not supported"
  2. SSE 4.2 supported
  3. root@GlonHo:/etc/apt/sources.list.d# vim clickhouse.list
  4. deb http://repo.yandex.ru/clickhouse/trusty stable main
  5. root@GlonHo:~# apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4
  6. Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.IoJhY8ePkd --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv E0C56BD4
  7. gpg: requesting key E0C56BD4 from hkp server keyserver.ubuntu.com
  8. gpg: key E0C56BD4: public key "ClickHouse Repository Key <milovidov@yandex-team.ru>" imported
  9. gpg: Total number processed: 1
  10. gpg: imported: 1 (RSA: 1)
  11. root@GlonHo:~# apt-get update
  12. Hit http://security.ubuntu.com trusty-security InRelease
  13. Ign http://archive.ubuntu.com trusty InRelease
  14. ...
  15. Reading package lists... Done
  16. root@GlonHo:~#
  17. root@GlonHo:~# apt-get install clickhouse-client clickhouse-server-common
  18. Reading package lists... Done
  19. Building dependency tree
  20. Reading state information... Done
  21. The following packages were automatically installed and are no longer required:
  22. acl at-spi2-core colord dconf-gsettings-backend dconf-service fontconfig
  23. fontconfig-config fonts-dejavu-core hicolor-icon-theme libasound2
  24. libasound2-data libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0
  25. libavahi-client3 libavahi-common-data libavahi-common3 libcairo-gobject2
  26. libcairo2 libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra0 libcolord1
  27. libcolorhug1 libcups2 libdatrie1 libdconf1 libdrm-intel1 libdrm-nouveau2
  28. libdrm-radeon1 libexif12 libfontconfig1 libfontenc1 libgd3
  29. libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx
  30. libglapi-mesa libgphoto2-6 libgphoto2-l10n libgphoto2-port10 libgraphite2-3
  31. libgtk-3-0 libgtk-3-bin libgtk-3-common libgudev-1.0-0 libgusb2
  32. libharfbuzz0b libice6 libieee1284-3 libjasper1 libjbig0 libjpeg-turbo8
  33. libjpeg8 liblcms2-2 libllvm3.4 libltdl7 libnotify-bin libnotify4 libogg0
  34. libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess0
  35. libpixman-1-0 libsane libsane-common libsm6 libtdb1 libthai-data libthai0
  36. libtiff5 libtxc-dxtn-s2tc0 libv4l-0 libv4lconvert0 libvorbis0a
  37. libvorbisfile3 libvpx1 libwayland-client0 libwayland-cursor0 libx11-xcb1
  38. libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
  39. libxcb-render0 libxcb-shm0 libxcb-sync1 libxcomposite1 libxcursor1
  40. libxdamage1 libxfixes3 libxfont1 libxi6 libxinerama1 libxkbcommon0
  41. libxkbfile1 libxmu6 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxt6
  42. libxtst6 libxxf86vm1 notification-daemon sound-theme-freedesktop x11-common
  43. x11-xkb-utils xfonts-base xfonts-encodings xfonts-utils xserver-common
  44. xserver-xorg-core
  45. Use 'apt-get autoremove' to remove them.
  46. The following extra packages will be installed:
  47. clickhouse-server-base
  48. The following NEW packages will be installed:
  49. clickhouse-client clickhouse-server-base clickhouse-server-common
  50. 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
  51. Need to get 198 MB of archives.
  52. After this operation, 632 MB of additional disk space will be used.
  53. Do you want to continue? [Y/n] y
  54. Get:1 http://repo.yandex.ru/clickhouse/trusty/ stable/main clickhouse-server-base amd64 1.1.54198 [198 MB]
  55. Get:2 http://repo.yandex.ru/clickhouse/trusty/ stable/main clickhouse-client amd64 1.1.54198 [2,674 B]
  56. Get:3 http://repo.yandex.ru/clickhouse/trusty/ stable/main clickhouse-server-common amd64 1.1.54198 [7,578 B]
  57. Fetched 198 MB in 18min 7s (182 kB/s)
  58. Selecting previously unselected package clickhouse-server-base.
  59. (Reading database ... 62852 files and directories currently installed.)
  60. Preparing to unpack .../clickhouse-server-base_1.1.54198_amd64.deb ...
  61. Unpacking clickhouse-server-base (1.1.54198) ...
  62. Selecting previously unselected package clickhouse-client.
  63. Preparing to unpack .../clickhouse-client_1.1.54198_amd64.deb ...
  64. Unpacking clickhouse-client (1.1.54198) ...
  65. Selecting previously unselected package clickhouse-server-common.
  66. Preparing to unpack .../clickhouse-server-common_1.1.54198_amd64.deb ...
  67. Unpacking clickhouse-server-common (1.1.54198) ...
  68. Processing triggers for ureadahead (0.100.0-16) ...
  69. Setting up clickhouse-server-base (1.1.54198) ...
  70. Processing triggers for ureadahead (0.100.0-16) ...
  71. Setting up clickhouse-client (1.1.54198) ...
  72. Setting up clickhouse-server-common (1.1.54198) ...
  73. root@GlonHo:~#
  74. root@GlonHo:~# top
  75. Tasks: 90 total, 2 running, 88 sleeping, 0 stopped, 0 zombie
  76. %Cpu(s): 0.0 us, 0.2 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
  77. KiB Mem: 2049856 total, 1147260 used, 902596 free, 16004 buffers
  78. KiB Swap: 0 total, 0 used, 0 free. 960556 cached Mem
  79. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
  80. 1262 root 20 0 112712 34552 1112 S 0.0 1.7 0:00.00 ruby
  81. 1196 root 20 0 182364 34428 2728 S 0.0 1.7 0:00.77 puppet
  82. **2368 clickho+ 20 0 241336 12524 3504 S 0.0 0.6 0:00.04 clickhouse-serv**
  83. 1973 root 20 0 107720 4216 3220 S 0.0 0.2 0:00.02 sshd
  84. root@GlonHo:~# ls /var/log/clickhouse-server/
  85. clickhouse-server.err.log clickhouse-server.log stderr stdout
  86. root@GlonHo:~# cat /var/log/clickhouse-server/clickhouse-server.err.log
  87. 2017.04.24 09:30:03.783101 [ 1 ] <Warning> ConfigProcessor: Include not found: networks
  88. 2017.04.24 09:30:03.783125 [ 1 ] <Warning> ConfigProcessor: Include not found: networks
  89. 2017.04.24 09:30:05.803298 [ 2 ] <Warning> ConfigProcessor: Include not found: clickhouse_remote_servers
  90. 2017.04.24 09:30:05.803353 [ 2 ] <Warning> ConfigProcessor: Include not found: clickhouse_compression
  91. root@GlonHo:~#
  92. root@GlonHo:~# cat /var/log/clickhouse-server/clickhouse-server.log
  93. 2017.04.24 09:30:03.708578 [ 1 ] <Information> : Starting daemon with revision 54198
  94. 2017.04.24 09:30:03.781176 [ 1 ] <Information> Application: starting up
  95. 2017.04.24 09:30:03.781650 [ 1 ] <Debug> Application: rlimit on number of file descriptors is 262144
  96. 2017.04.24 09:30:03.781664 [ 1 ] <Debug> Application: Initializing DateLUT.
  97. 2017.04.24 09:30:03.781670 [ 1 ] <Trace> Application: Initialized DateLUT with time zone `UTC'.
  98. 2017.04.24 09:30:03.782226 [ 1 ] <Debug> Application: Configuration parameter 'interserver_http_host' doesn't exist or exists and empty. Will use 'ubuntu' as replica host.
  99. 2017.04.24 09:30:03.782338 [ 1 ] <Debug> ConfigReloader: Loading config `/etc/clickhouse-server/users.xml'
  100. 2017.04.24 09:30:03.783093 [ 1 ] <Warning> ConfigProcessor: Include not found: networks
  101. 2017.04.24 09:30:03.783121 [ 1 ] <Warning> ConfigProcessor: Include not found: networks
  102. 2017.04.24 09:30:03.783472 [ 1 ] <Information> Application: Loading metadata.
  103. 2017.04.24 09:30:03.783610 [ 1 ] <Information> DatabaseOrdinary (default): Total 0 tables.
  104. 2017.04.24 09:30:03.783734 [ 1 ] <Debug> Application: Loaded metadata.
  105. 2017.04.24 09:30:03.783848 [ 1 ] <Information> DatabaseOrdinary (system): Total 0 tables.
  106. 2017.04.24 09:30:03.784376 [ 1 ] <Information> Application: Listening http://[::1]:8123
  107. 2017.04.24 09:30:03.784420 [ 1 ] <Information> Application: Listening tcp: [::1]:9000
  108. 2017.04.24 09:30:03.784448 [ 1 ] <Information> Application: Listening interserver: [::1]:9009
  109. 2017.04.24 09:30:03.784473 [ 1 ] <Information> Application: Listening http://127.0.0.1:8123
  110. 2017.04.24 09:30:03.784491 [ 1 ] <Information> Application: Listening tcp: 127.0.0.1:9000
  111. 2017.04.24 09:30:03.784507 [ 1 ] <Information> Application: Listening interserver: 127.0.0.1:9009
  112. 2017.04.24 09:30:03.784621 [ 1 ] <Information> Application: Ready for connections.
  113. 2017.04.24 09:30:05.801608 [ 2 ] <Debug> ConfigReloader: Loading config `/etc/clickhouse-server/config.xml'
  114. 2017.04.24 09:30:05.803274 [ 2 ] <Warning> ConfigProcessor: Include not found: clickhouse_remote_servers
  115. 2017.04.24 09:30:05.803348 [ 2 ] <Warning> ConfigProcessor: Include not found: clickhouse_compression
  116. root@GlonHo:~# cat /var/log/clickhouse-server/stderr
  117. Should logs to /var/log/clickhouse-server/clickhouse-server.log
  118. Should error logs to /var/log/clickhouse-server/clickhouse-server.err.log
  119. root@GlonHo:~# clickhouse-client
  120. ClickHouse client version 1.1.54198.
  121. Connecting to localhost:9000.
  122. Connected to ClickHouse server version 1.1.54198.
  123. :)
  124. :) select 1
  125. SELECT 1
  126. ┌─1─┐
  127. 1
  128. └───┘
  129. 1 rows in set. Elapsed: 0.023 sec.
  130. :)
  131. :) select now()
  132. SELECT now()
  133. ┌───────────────now()─┐
  134. 2017-04-24 09:37:31
  135. └─────────────────────┘
  136. 1 rows in set. Elapsed: 0.005 sec.
  137. :)
  138. :) Bye. (CTRL + d 退出客户端)
  139. root@GlonHo:~# service clickhouse-server stop
  140. Stop clickhouse-server service: DONE

日志变化:

  1. root@GlonHo:~# tail -f /var/log/clickhouse-server/clickhouse-server.log
  2. 2017.04.24 09:36:59.286669 [ 3 ] <Trace> TCPConnectionFactory: TCP Request. Address: 127.0.0.1:36942
  3. 2017.04.24 09:36:59.288258 [ 3 ] <Debug> TCPHandler: Connected ClickHouse client version 1.1.54198, user: default.
  4. 2017.04.24 09:37:15.669268 [ 3 ] <Debug> executeQuery: (from 127.0.0.1:36942) select 1
  5. 2017.04.24 09:37:15.678877 [ 3 ] <Trace> InterpreterSelectQuery: FetchColumns -> Complete
  6. 2017.04.24 09:37:15.679000 [ 3 ] <Debug> executeQuery: Query pipeline:
  7. Expression
  8. Expression
  9. One
  10. 2017.04.24 09:37:15.679459 [ 3 ] <Information> executeQuery: Read 1 rows, 1.00 B in 0.010 sec., 98 rows/sec., 98.89 B/sec.
  11. 2017.04.24 09:37:15.679521 [ 3 ] <Debug> MemoryTracker: Peak memory usage (for query): 1.00 MiB.
  12. 2017.04.24 09:37:15.679541 [ 3 ] <Debug> MemoryTracker: Peak memory usage (for user): 1.00 MiB.
  13. 2017.04.24 09:37:15.679548 [ 3 ] <Debug> MemoryTracker: Peak memory usage (total): 1.00 MiB.
  14. 2017.04.24 09:37:15.679559 [ 3 ] <Information> TCPHandler: Processed in 0.011 sec.
  15. 2017.04.24 09:37:31.497405 [ 3 ] <Debug> executeQuery: (from 127.0.0.1:36942) select now()
  16. 2017.04.24 09:37:31.497653 [ 3 ] <Trace> InterpreterSelectQuery: FetchColumns -> Complete
  17. 2017.04.24 09:37:31.497976 [ 3 ] <Debug> executeQuery: Query pipeline:
  18. Expression
  19. Expression
  20. One
  21. 2017.04.24 09:37:31.500776 [ 3 ] <Information> executeQuery: Read 1 rows, 1.00 B in 0.003 sec., 313 rows/sec., 313.78 B/sec.
  22. 2017.04.24 09:37:31.500856 [ 3 ] <Debug> MemoryTracker: Peak memory usage (for query): 1.00 MiB.
  23. 2017.04.24 09:37:31.500872 [ 3 ] <Debug> MemoryTracker: Peak memory usage (for user): 1.00 MiB.
  24. 2017.04.24 09:37:31.500880 [ 3 ] <Debug> MemoryTracker: Peak memory usage (total): 1.00 MiB.
  25. 2017.04.24 09:37:31.500893 [ 3 ] <Information> TCPHandler: Processed in 0.004 sec.
  26. 2017.04.24 10:04:11.313863 [ 3 ] <Information> TCPHandler: Done processing connection.
  27. 2017.04.24 10:04:36.359834 [ 4 ] <Information> Application: Received termination signal (Terminated)
  28. 2017.04.24 10:04:36.359978 [ 1 ] <Debug> Application: Received termination signal.
  29. 2017.04.24 10:04:36.360021 [ 1 ] <Debug> Application: Waiting for current connections to close.
  30. 2017.04.24 10:04:37.000043 [ 1 ] <Debug> Application: Closed all connections.
  31. 2017.04.24 10:04:37.004456 [ 1 ] <Information> Application: Shutting down storages.
  32. 2017.04.24 10:04:37.005499 [ 1 ] <Debug> Application: Shutted down storages.
  33. 2017.04.24 10:04:37.010125 [ 1 ] <Debug> Application: Destroyed global context.
  34. 2017.04.24 10:04:37.010483 [ 1 ] <Information> Application: shutting down
  35. 2017.04.24 10:04:37.011206 [ 1 ] <Debug> Application: Uninitializing subsystem: Logging Subsystem
  36. 2017.04.24 10:04:37.011572 [ 4 ] <Information> BaseDaemon: Stop SignalListener thread

参考:

https://clickhouse.yandex/

https://github.com/redsoftbiz/clickhouse-rpm

ClickHouse 快速入门的更多相关文章

  1. Web Api 入门实战 (快速入门+工具使用+不依赖IIS)

    平台之大势何人能挡? 带着你的Net飞奔吧!:http://www.cnblogs.com/dunitian/p/4822808.html 屁话我也就不多说了,什么简介的也省了,直接简单概括+demo ...

  2. SignalR快速入门 ~ 仿QQ即时聊天,消息推送,单聊,群聊,多群公聊(基础=》提升)

     SignalR快速入门 ~ 仿QQ即时聊天,消息推送,单聊,群聊,多群公聊(基础=>提升,5个Demo贯彻全篇,感兴趣的玩才是真的学) 官方demo:http://www.asp.net/si ...

  3. 前端开发小白必学技能—非关系数据库又像关系数据库的MongoDB快速入门命令(2)

    今天给大家道个歉,没有及时更新MongoDB快速入门的下篇,最近有点小忙,在此向博友们致歉.下面我将简单地说一下mongdb的一些基本命令以及我们日常开发过程中的一些问题.mongodb可以为我们提供 ...

  4. 【第三篇】ASP.NET MVC快速入门之安全策略(MVC5+EF6)

    目录 [第一篇]ASP.NET MVC快速入门之数据库操作(MVC5+EF6) [第二篇]ASP.NET MVC快速入门之数据注解(MVC5+EF6) [第三篇]ASP.NET MVC快速入门之安全策 ...

  5. 【番外篇】ASP.NET MVC快速入门之免费jQuery控件库(MVC5+EF6)

    目录 [第一篇]ASP.NET MVC快速入门之数据库操作(MVC5+EF6) [第二篇]ASP.NET MVC快速入门之数据注解(MVC5+EF6) [第三篇]ASP.NET MVC快速入门之安全策 ...

  6. Mybatis框架 的快速入门

    MyBatis 简介 什么是 MyBatis? MyBatis 是支持普通 SQL 查询,存储过程和高级映射的优秀持久层框架.MyBatis 消除 了几乎所有的 JDBC 代码和参数的手工设置以及结果 ...

  7. grunt快速入门

    快速入门 Grunt和 Grunt 插件是通过 npm 安装并管理的,npm是 Node.js 的包管理器. Grunt 0.4.x 必须配合Node.js >= 0.8.0版本使用.:奇数版本 ...

  8. 【第一篇】ASP.NET MVC快速入门之数据库操作(MVC5+EF6)

    目录 [第一篇]ASP.NET MVC快速入门之数据库操作(MVC5+EF6) [第二篇]ASP.NET MVC快速入门之数据注解(MVC5+EF6) [第三篇]ASP.NET MVC快速入门之安全策 ...

  9. 【第四篇】ASP.NET MVC快速入门之完整示例(MVC5+EF6)

    目录 [第一篇]ASP.NET MVC快速入门之数据库操作(MVC5+EF6) [第二篇]ASP.NET MVC快速入门之数据注解(MVC5+EF6) [第三篇]ASP.NET MVC快速入门之安全策 ...

随机推荐

  1. Servlet 3.0/3.1 中的异步处理

    在Servlet 3.0之前,Servlet采用Thread-Per-Request的方式处理请求,即每一次Http请求都由某一个线程从头到尾负责处理.如果一个请求需要进行IO操作,比如访问数据库.调 ...

  2. 《C++之那些年踩过的坑(二)》

    C++之那些年踩过的坑(二) 作者:刘俊延(Alinshans) 本系列文章针对我在写C++代码的过程中,尤其是做自己的项目时,踩过的各种坑.以此作为给自己的警惕. 今天讲一个小点,虽然小,但如果没有 ...

  3. 最大化最小值 Aggressive cows

    Aggressive cows http://poj.org/problem?id=2456 N间小屋,M头牛,使得牛跟牛之间的距离最远,以防止牛打架. 2<=N<=100000 2< ...

  4. 【故障•监听】TNS-12518、TNS-00517和 Linux Error:32:Broken pipe

    [故障|监听]TNS-12518.TNS-00517和 Linux Error:32:Broken pipe 1.1  BLOG文档结构图 1.2  前言部分 1.2.1  导读和注意事项 各位技术爱 ...

  5. 菜鸟聊JavaScript中this

    菜鸟聊this this在JavaScript中是一个比较头疼的问题,我现在以一枚菜鸟的观点结合代码简单的谈下JavaScript中的this指向问题. 1.例子1 function a() { va ...

  6. OpenCV使用FindContours进行二维码定位

    我使用过FindContours,而且知道有能够直接寻找联通区域的函数.但是我使用的大多只是"最大轮廓"或者"轮廓数目"这些数据.其实轮廓还有另一个很重要的性质 ...

  7. 【转】JavaScript 之arguments、caller 和 callee 介绍

    1.前言 arguments, caller ,   callee 是什么? 在JavaScript 中有什么样的作用?本篇会对于此做一些基本介绍. 本文转载自:http://blog.csdn.ne ...

  8. Android学习探索之本地原生渲染 LaTeX数据公式

    前言: 一直致力于为公司寻找更加高效的解决方案,作为一款K12在线教育App,功能中难免会有LaTeX数学公式的显示需求,这部分公司已经实现了此功能,只是个人觉得在体验和效率上还是不太好,今天来聊一下 ...

  9. "the hypervisor is not running" 故障

    在我们日常服务器管理中,常常会遇到创建虚拟机,如果在一台新部署的 Hyper-V 上新建一个 Virtual Machine 时,出现错误信息:"The virtual machine co ...

  10. (29)网络编程之TCP通信协议

    TCP通信协议特点: 1.tcp协议是基于IO流进行数据的传输,是面向链接的. 2.tcp进行数据传输的时候,数据没有大小限制的. 3.面向链接,通过三次握手的机制,保证数据的完整性,是一个可靠的协议 ...