Skip to content

Instantly share code, notes, and snippets.

View filimonov's full-sized avatar

filimonov filimonov

View GitHub Profile
@den-crane
den-crane / gist:6eff375752a236a456e1b3dc2ca7db62
Last active September 30, 2023 08:43
Clickhouse example AggregatingMergeTree, (max, min, avg ) State / Merge
DROP TABLE IF EXISTS requests;
CREATE TABLE requests (
request_date Date,
request_time DateTime,
response_time Int,
request_uri String)
ENGINE = MergeTree(request_date, (request_time, request_uri), 8192);
+ - сделано хотя бы в master
* - в процессе
Доработки форматов.
+ Protobuf
+ Parquet
+ Avro
+ Настраиваемое поведение CSV: separator.
@kmatt
kmatt / clickhouse-server.init
Last active October 24, 2019 09:46
Clickhouse init script for CentOS
#!/bin/sh
### BEGIN INIT INFO
# Provides: clickhouse-server
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Required-Start:
# Required-Stop:
# Short-Description: Yandex clickhouse-server daemon
### END INIT INFO
Как настроить Tableau over ClickHouse ODBC на Windows
==== ODBC-драйвер для Clickhouse
1. Надо поставить драйвер https://github.com/yandex/clickhouse-odbc/releases/latest
2. Создать источник данных odbc. Пример:
https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-dsn-windows-5-2.html
Надо выбрать Unicode версию odbc-драйвера
@StevenACoffman
StevenACoffman / Docker Best Practices.md
Last active April 29, 2024 08:36
Docker Best Practices

Mistakes to Avoid: Docker Antipatterns

Whichever route you take to implementing containers, you’ll want to steer clear of common pitfalls that can undermine the efficiency of your Docker stack.

Don’t run too many processes inside a single container

The beauty of containers—and an advantage of containers over virtual machines—is that it is easy to make multiple containers interact with one another in order to compose a complete application. There is no need to run a full application inside a single container. Instead, break your application down as much as possible into discrete services, and distribute services across multiple containers. This maximizes flexibility and reliability.

Don’t install operating systems inside Docker containers

It is possible to install a complete Linux operating system inside a container. In most cases, however, this is not necessary. If your goal is to host just a single application or part of an application in the container, you need to install only the essential

:) CREATE TABLE test.sessions (begin DateTime, end DateTime) ENGINE = Memory
CREATE TABLE test.sessions
(
begin DateTime,
end DateTime
) ENGINE = Memory
Ok.

Building Kafka from the Hardware - up

  • Higher Message Retention ? - Increase disk size
  • Higher Message Throughput ? - Increase network capacity
  • Higher Producer Performance ? - Increase Disk I/O speed
  • Higher Consumer Performance ? - Increase Memory

Critical Configurations (Consumer)

  • queued.min.messages
  • fetch.wait.max.ms
  • socket.blocking.max.ms
@alexey-milovidov
alexey-milovidov / rank.txt
Created July 22, 2016 00:03
Example of emulation of rank function with arrayEnumerateUniq.
milovidov@milovidov-xenial:~$ clickhouse-client
ClickHouse client version 1.1.53996.
Connecting to localhost:9000.
Connected to ClickHouse server version 1.1.53996.
:) CREATE TABLE IF NOT EXISTS `employee` (
:-] `empid` Int32,
:-] `deptid` Int32,
:-] `salary` Int64
:-] ) ENGINE = Memory;
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
KEYBINDINGS
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
are:
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window