Deprecated: Function Yoast\WP\SEO\Conditionals\Schema_Blocks_Conditional::get_feature_flag is deprecated since version Yoast SEO 20.5 with no alternative available. in /home1/minerho3/public_html/wp-includes/functions.php on line 6078

Deprecated: Function Yoast\WP\SEO\Conditionals\Schema_Blocks_Conditional::get_feature_flag is deprecated since version Yoast SEO 20.5 with no alternative available. in /home1/minerho3/public_html/wp-includes/functions.php on line 6078

Deprecated: Function Yoast\WP\SEO\Conditionals\Schema_Blocks_Conditional::get_feature_flag is deprecated since version Yoast SEO 20.5 with no alternative available. in /home1/minerho3/public_html/wp-includes/functions.php on line 6078

Warning: Cannot modify header information - headers already sent by (output started at /home1/minerho3/public_html/wp-includes/functions.php:6078) in /home1/minerho3/public_html/wp-includes/feed-rss2.php on line 8
MySQL - MariaDB - ClickHouse - InnoDB - Galera Cluster - MySQL Support - MariaDB Support - MySQL Consulting - MariaDB Consulting - MySQL Remote DBA - MariaDB Remote DBA - Emergency DBA Support - Remote DBA - Database Migration - PostgreSQL - PostgreSQL Consulting - PostgreSQL Support - PostgreSQL Remote DBA https://minervadb.com/index.php/category/clickhouse-consulting/ Committed to Building Optimal, Scalable, Highly Available, Fault-Tolerant, Reliable and Secured WebScale Database Infrastructure Operations Wed, 25 Dec 2019 20:02:06 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 https://minervadb.com/wp-content/uploads/2017/10/cropped-LogoColorTextRight-32x32.jpeg MySQL - MariaDB - ClickHouse - InnoDB - Galera Cluster - MySQL Support - MariaDB Support - MySQL Consulting - MariaDB Consulting - MySQL Remote DBA - MariaDB Remote DBA - Emergency DBA Support - Remote DBA - Database Migration - PostgreSQL - PostgreSQL Consulting - PostgreSQL Support - PostgreSQL Remote DBA https://minervadb.com/index.php/category/clickhouse-consulting/ 32 32 How to use ProxySQL to work on ClickHouse like MySQL ? https://minervadb.com/index.php/2019/12/25/how-to-use-proxysql-to-work-on-clickhouse-like-mysql/ https://minervadb.com/index.php/2019/12/25/how-to-use-proxysql-to-work-on-clickhouse-like-mysql/#comments Wed, 25 Dec 2019 19:45:42 +0000 http://minervadb.com/?p=2926 Use ClickHouse like MySQL with ProxySQL Introduction We have several customers on ClickHouse now for both columnar database analytics and archiving MySQL data, You can access data from ClickHouse with clickhouse-client but this involves some [...]

The post How to use ProxySQL to work on ClickHouse like MySQL ? appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
Use ClickHouse like MySQL with ProxySQL

Introduction

We have several customers on ClickHouse now for both columnar database analytics and archiving MySQL data, You can access data from ClickHouse with clickhouse-client but this involves some learning  and also limitations technically. Our customers are very comfortable using MySQL so they always preferred a MySQL client for ClickHouse query analysis and reporting, Thankfully ProxySQL works as a optimal bridge between ClickHouse and MySQL client, This indeed was a great news for us and our customers worldwide. This blog post is about how we can use MySQL client with ClickHouse.

Installation

Start ProxySQL once completed installation successfully.

  # The default configuration file is this: 
  /etc/proxysql.cnf 
  # There is no such data directory by default: 
  mkdir / var / lib / proxysql 
  # start up 
  proxysql --clickhouse-server 
  # ProxySQL will default to daemon mode in the background

Creating ClickHouse user

Create a user for ClickHouse in the ProxySQL with password, The password is not configured for ClickHouse but for accessing ProxySQL:  

# ProxySQL port is 6032, the default username and password are written in the configuration file 
 root@10.xxxx: / root # mysql -h 127.0.0.1 -P 6032 -uadmin -padmin 
 Welcome to the MariaDB monitor. Commands end with; or \ g. 
 Your MySQL connection id is 3 
  Server version: 5.6.81 (ProxySQL Admin Module) 
  Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. 
  Type 'help;' or '\ h' for help. Type '\ c' to clear the current input statement. 
  MySQL [(none)]> INSERT INTO clickhouse_users VALUES ('chuser', 'chpasswd', 1,100); 
  Query OK, 1 row affected (0.00 sec) 
  MySQL [(none)] > select * from clickhouse_users; 
  + ---------- + ---------- + -------- + ----------------- + 
  | username | password | active | max_connections | 
  + ---------- + ---------- + -------- + ----------------- + 
  | chuser | chpasswd | 1 | 100 | 
  + ---------- + ---------- + -------- + ----------------- + 
  1 row in set (0.00 sec) 
  MySQL [(none)]> LOAD CLICKHOUSE USERS TO RUNTIME; 
  Query OK, 0 rows affected (0.00 sec) 
  MySQL [(none)]> SAVE CLICKHOUSE USERS TO DISK; 
  Query OK, 0 rows affected (0.00 sec)

Connecting to ClickHouse from MySQL Client 

By default ProxySQL opens the port 6090 to receive user access to ClickHouse:

  # Use username and password above 
  # If it is a different machine, remember to change the IP 
  root@10.xxxx: / root # mysql -h 127.0.0.1 -P 6090 -uclicku -pclickp --prompt "ProxySQL-To-ClickHouse>" 
  Welcome to the MariaDB monitor. Commands end with; or \ g. 
  Your MySQL connection id is 64 
  Server version: 5.6.81 (ProxySQL ClickHouse Module) 
  Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. 
  Type 'help;' or '\ h' for help. Type '\ c' to clear the current input statement. 
  ProxySQL-To-ClickHouse >

Querying ClickHouse like MySQL

 MySQL [(none)] > select version (); 
+ ------------------- + 
| version | 
+ ------------------- + 
| 5.6.81-clickhouse | 
+ ------------------- + 
1 row in set (0.00 sec) 
MySQL [(none)] > select now (); 
+ --------------------- + 
| now () | 
+ --------------------- + 
| 2019-12-25 20:17:14 | 
+ --------------------- + 
1 row in set (0.00 sec) 
MySQL [(none)] > select today (); 
+ ------------ + 
| today () | 
+ ------------ + 
| 2019-12-25 | 
+ ------------ + 
1 row in set (0.00 sec) 
# Our table is over 55 billion 
ProxySQL-To-ClickHouse > select count (*) from mysql_audit_log_data; 
+ ------------- + 
| count () | 
+ ------------- + 
| 539124837571 | 
+ ------------- + 
1 row in set (8.31 sec) 

Limitations

  • This ProxySQL solution works only when it is on the local ClickHouse (Note.- ClickHouse instance cannot have password in this ecosystem / recommended solution)
  • ProxySQL query rewrite limitations – The simple queries work seamless, The complex query rewrite are quite expense and there might some levels of SQL semantics limitations 

Conclusion – ProxySQL Version 2.0.8 new features and enhancements

  • Changed default max_allowed_packet from 4M to 64M
  • Added support for mysqldump 8.0 and Admin #2340
  • Added new variable mysql-aurora_max_lag_ms_only_read_from_replicas : if max_lag_ms is used and the writer is in the reader hostgroup, the writer will be excluded if at least N replicas are good candidates.
  • Added support for unknown character set , and for collation id greater than 255 #1273
  • Added new variable mysql-log_unhealthy_connections to suppress messages related to unhealty clients connections being closed
  • Reimplemented rules_fast_routing using khash
  • Added support for SET CHARACTERSET #1692
  • Added support for same node into multiple Galera clusters #2290
  • Added more verbose output for error 2019 (Can’t initialize character set) #2273
  • Added more possible values for mysql_replication_hostgroups.check_type #2186
    • read_only | innodb_read_only
    • read_only & innodb_read_only
  • Added support and packages for RHEL / CentOS 8

References: 

The post How to use ProxySQL to work on ClickHouse like MySQL ? appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
https://minervadb.com/index.php/2019/12/25/how-to-use-proxysql-to-work-on-clickhouse-like-mysql/feed/ 1
Database Replication from MySQL to ClickHouse for High Performance WebScale Analytics https://minervadb.com/index.php/2019/10/01/database-replication-from-mysql-to-clickhouse-for-high-performance-webscale-analytics/ Tue, 01 Oct 2019 19:12:51 +0000 http://minervadb.com/?p=2740 MySQL to ClickHouse Replication  MySQL works great for Online Transaction Processing (OLTP) systems, MySQL performance degrades with analytical queries on very large database infrastructure, I agree you can optimize MySQL query performance with InnoDB compressions [...]

The post Database Replication from MySQL to ClickHouse for High Performance WebScale Analytics appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
MySQL to ClickHouse Replication 

MySQL works great for Online Transaction Processing (OLTP) systems, MySQL performance degrades with analytical queries on very large database infrastructure, I agree you can optimize MySQL query performance with InnoDB compressions but why then combine OLTP and OLAP (Online Analytics Processing Systems) when you have columnar stores which can deliver high performance analytical queries more efficiently? I have seen several companies building dedicated MySQL servers for Analytics but over the period of time they end spending more money in fine tuning MySQL for Analytics with no significant improvements, There is no point in blaming MySQL for what it is not built for, MySQL / MariaDB is any day a bad choice for columnar analytics / big data solutions.  Columnar database systems are best suited for handling large quantities of data: data stored in columns typically is easier to compress, it is also easier to access on per column basis – typically you ask for some data stored in a couple of columns – an ability to retrieve just those columns instead of reading all of the rows and filter out unneeded data makes the data accessed faster. So how can you combine the best of both ? Using MySQL purely for Transaction Processing Systems and Archiving MySQL Transactional Data for Data Analytics on a columnar store like ClickHouse, This post is about archiving and replicating data from MySQL to ClickHouse, you can continue reading from here.

Recommended Reading for ClickHouse: 

The post Database Replication from MySQL to ClickHouse for High Performance WebScale Analytics appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
Why we recommend ClickHouse over many other columnar database systems ? https://minervadb.com/index.php/2018/03/06/why-we-recommend-clickhouse-over-many-other-columnar-database-systems/ Tue, 06 Mar 2018 04:42:38 +0000 http://minervadb.com/?p=977 Compact data storage – Ten billions UInt8-type values should exactly consume 10GB uncompressed to efficiently use available CPU . Optimal storage even when uncompressed benefit performance and resource management . ClickHouse is built is store [...]

The post Why we recommend ClickHouse over many other columnar database systems ? appeared first on The WebScale Database Infrastructure Operations Experts.

]]>
  • Compact data storage – Ten billions UInt8-type values should exactly consume 10GB uncompressed to efficiently use available CPU . Optimal storage even when uncompressed benefit performance and resource management . ClickHouse is built is store data efficiently without any garbage .
  • CPU efficient – Whenever possible, ClickHouse operations are dispatched on arrays, rather than on individual values. This is called “vectorized query execution,” and it helps lower the cost of actual data processing.
  • Data compression – ClickHouse supports two kinds of compression LZ4 and ZSTD . LZ4 is faster than ZSTD but compression ratio is smaller .ZSTD is faster and compress better  than traditional Zlib but slower than LZ4 .  We recommend customers LZ4 , when I/O is fast enough so decompression speed will become a bottleneck . When using super ultra fast disk subsystems you have an option to specify “none” compression . ZSTD is recommended when I/O is the bottleneck in queries with large range scans .
  • Can store data in disk – The columnar database systems like SAP HANA and Google PowerDrill can only work in the RAM .
  • Massively Parallel Processing – ClickHouse is capable of Massively Parallel Processing very large / complex SQL(s) optimally and cost efficiently
  • Built for web-scale data analytics – ClickHouse support sharding and distributed processing, This makes ClickHouse most preferred columnar database system for web-scale . Each shard in ClickHouse can be a group of replicas addressing maximum reliability and fault tolerance .
  • ClickHouse support Primary Key – ClickHouse permits real-time data updates with primary key (there will be no locking when adding data) . Data is sorted incrementally using the merge tree to perform queries on the range of primary key values .
  • Built for statistical analysis and support partial aggregation – ClickHouse is statistical query analysis ready columnar database store supporting aggregate functions for approximated calculation of the number of various values, medians, and quantiles. ClickHouse support aggregation for a limited number of random keys, instead for all the keys . You can query on a part (sample) of data and generate approximate result reducing disk I/O operations considerably .
  • Supports SQL – ClickHouse supports SQL, Subqueries are supported in FROM, IN, and JOIN clauses, as well as scalar subqueries. Dependent subqueries are not supported.
  • Supports data replication – ClickHouse supports asynchronous multi-master and master-slave replication .
  • The post Why we recommend ClickHouse over many other columnar database systems ? appeared first on The WebScale Database Infrastructure Operations Experts.

    ]]>
    Join ClickHouse India Users Group https://minervadb.com/index.php/2018/02/04/join-clickhouse-india-users-group/ Sun, 04 Feb 2018 17:19:03 +0000 http://minervadb.com/?p=760 We have created ClickHouse India Users Group for passionate ClickHouse professionals to discus about their favourite open source columnar database system . We have started ClickHouse India Users Group as an Facebook group page (https://www.facebook.com/groups/AICUG/) to [...]

    The post Join ClickHouse India Users Group appeared first on The WebScale Database Infrastructure Operations Experts.

    ]]>
    We have created ClickHouse India Users Group for passionate ClickHouse professionals to discus about their favourite open source columnar database system . We have started ClickHouse India Users Group as an Facebook group page (https://www.facebook.com/groups/AICUG/) to connect with ClickHouse professionals worldwide better . As we grow, we will have an dedicated web property for ClickHouse India Users Group . This will be an open group forever and ClickHouse users can use this group for conferences, meet-ups, knowledge sharing, professional development and networking , Thanks for your support and welcome to ClickHouse India Users Group !

    ClickHouse repositories and downloads

    Github:

    Server Packages:

    Client Packages:

    The post Join ClickHouse India Users Group appeared first on The WebScale Database Infrastructure Operations Experts.

    ]]>