{"id":13630478,"url":"https://github.com/vectorengine/vectorsql","last_synced_at":"2025-04-17T13:32:32.109Z","repository":{"id":37633429,"uuid":"234910993","full_name":"vectorengine/vectorsql","owner":"vectorengine","description":"VectorSQL is a free analytics DBMS for IoT \u0026 Big Data, compatible with ClickHouse.","archived":true,"fork":false,"pushed_at":"2021-10-16T08:44:06.000Z","size":1431,"stargazers_count":287,"open_issues_count":11,"forks_count":54,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-08T21:39:01.472Z","etag":null,"topics":["clickhouse","column-store","distributed-database","iot","olap","pipeline","reactive","stream-processing"],"latest_commit_sha":null,"homepage":"https://github.com/vectorengine/vectordb","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vectorengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-19T14:11:49.000Z","updated_at":"2024-10-29T06:28:14.000Z","dependencies_parsed_at":"2022-08-08T21:01:44.537Z","dependency_job_id":null,"html_url":"https://github.com/vectorengine/vectorsql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorengine%2Fvectorsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorengine%2Fvectorsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorengine%2Fvectorsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorengine%2Fvectorsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vectorengine","download_url":"https://codeload.github.com/vectorengine/vectorsql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249344854,"owners_count":21254751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clickhouse","column-store","distributed-database","iot","olap","pipeline","reactive","stream-processing"],"created_at":"2024-08-01T22:01:44.485Z","updated_at":"2025-04-17T13:32:31.587Z","avatar_url":"https://github.com/vectorengine.png","language":"Go","funding_links":[],"categories":["开源类库","Go","Open source library"],"sub_categories":["数据库","Database"],"readme":"**NOTICE: This project have moved to** [**Databend**](https://github.com/datafuselabs/databend)\n\n\u003cimg src=\"logo/vectorsql.svg\" alt=\"VectorSQL Logo\" width=\"40%\"\u003e\n\n-----------------\n\n[![Github Actions Status](https://github.com/vectorengine/vectorsql/workflows/VectorSQL%20Build/badge.svg)](https://github.com/vectorengine/vectorsql/actions?query=workflow%3A%22VectorSQL+Build%22)\n[![Github Actions Status](https://github.com/vectorengine/vectorsql/workflows/VectorSQL%20Test/badge.svg)](https://github.com/vectorengine/vectorsql/actions?query=workflow%3A%22VectorSQL+Test%22)\n[![Github Actions Status](https://github.com/vectorengine/vectorsql/workflows/VectorSQL%20Coverage/badge.svg)](https://github.com/vectorengine/vectorsql/actions?query=workflow%3A%22VectorSQL+Coverage%22)\n[![codecov.io](https://codecov.io/gh/vectorengine/vectorsql/branch/master/graph/badge.svg)](https://codecov.io/gh/vectorengine/vectorsql/branch/master)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nVectorSQL is a free analytics DBMS for IoT \u0026 Big Data, compatible with ClickHouse.\n\n## Features\n\n* **High Performance**\n* **High Scalability**\n* **High Reliability**\n\n## Server\n\n```\n$git clone https://github.com/vectorengine/vectorsql\n$cd vectorsql\n$make build\n$./bin/vectorsql-server -c conf/vectorsql-default.toml\n\t\n 2020/01/27 19:02:39.245654    \t [DEBUG] \tDatabase-\u003eAttach Table:system.tables, engine:SYSTEM_TABLES \u003cattachTable@database_system.go:116\u003e\n 2020/01/27 19:02:39.245670    \t [DEBUG] \tDatabase-\u003eAttach Table:system.databases, engine:SYSTEM_DATABASES \u003cattachTable@database_system.go:116\u003e\n 2020/01/27 19:02:39.245680    \t [INFO] \tDatabase-\u003eLoad Database:system \u003cloadSystemDatabases@databases.go:110\u003e\n 2020/01/27 19:02:39.245794    \t [INFO] \tListening for connections with native protocol (tcp)::9000 \u003cStart@server.go:33\u003e\n 2020/01/27 19:02:39.245806    \t [INFO] \tServers start... \u003cmain@server.go:62\u003e\n```\n\n## Client\n\n* clickhouse-client\n\n```\n$clickhouse-client --compression=0\nVectorSQL :) SELECT SUM(IF(status!=200, 1, 0)) AS errors, SUM(IF(status=200, 1, 0)) as success, (errors/COUNT(server)) AS error_rate,(success/COUNT(server)) as success_rate, (SUM(response_time)/COUNT(server)) AS load_avg, MIN(response_time), MAX(response_time), path, server FROM logmock(rows-\u003e15) GROUP BY server, path HAVING errors\u003e0 ORDER BY server ASC, load_avg DESC;\n\nSELECT \n    SUM(IF(status != 200, 1, 0)) AS errors, \n    SUM(IF(status = 200, 1, 0)) AS success, \n    errors / COUNT(server) AS error_rate, \n    success / COUNT(server) AS success_rate, \n    SUM(response_time) / COUNT(server) AS load_avg, \n    MIN(response_time), \n    MAX(response_time), \n    path, \n    server\nFROM logmock(rows -\u003e 15)\nGROUP BY \n    server, \n    path\nHAVING errors \u003e 0\nORDER BY \n    server ASC, \n    load_avg DESC\n\n┌─errors─┬─success─┬─error_rate─┬─success_rate─┬─load_avg─┬─MIN(response_time)─┬─MAX(response_time)─┬─path───┬─server──────┐\n│      2 │       1 │     0.6667 │       0.3333 │       12 │                 10 │                 13 │ /login │ 192.168.0.1 │\n│      1 │       5 │     0.1667 │       0.8333 │  11.1667 │                 10 │                 12 │ /index │ 192.168.0.1 │\n│      1 │       3 │       0.25 │         0.75 │    11.25 │                 10 │                 14 │ /index │ 192.168.0.2 │\n│      1 │       1 │        0.5 │          0.5 │       11 │                 10 │                 12 │ /login │ 192.168.0.2 │\n└────────┴─────────┴────────────┴──────────────┴──────────┴────────────────────┴────────────────────┴────────┴─────────────┘\n↓ Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.) \n4 rows in set. Elapsed: 0.005 sec. \n```\n\n* http-client\n\n```\ncurl -XPOST http://127.0.0.1:8123 -d \"SELECT SUM(IF(status!=200, 1, 0)) AS errors, SUM(IF(status=200, 1, 0)) as success, (errors/COUNT(server)) AS error_rate,(success/COUNT(server)) as success_rate, (SUM(response_time)/COUNT(server)) AS load_avg, MIN(response_time), MAX(response_time), path, server FROM logmock(rows-\u003e15) GROUP BY server, path HAVING errors\u003e0 ORDER BY server ASC, load_avg DESC\"\n2\t1\t0.6667\t0.3333\t12.0000\t10\t13\t/login\t192.168.0.1\n1\t5\t0.1667\t0.8333\t11.1667\t10\t12\t/index\t192.168.0.1\n1\t3\t0.2500\t0.7500\t11.2500\t10\t14\t/index\t192.168.0.2\n1\t1\t0.5000\t0.5000\t11.0000\t10\t12\t/login\t192.168.0.2\n```\n\n## Query Language Features\n\n|Query language                 |Current version|Future versions|Example                   |\n|-------------------------------|---------------|---------------|--------------------------|\n|Scans by Value                 |+              |+              |SELECT a,b                |\n|Scans by Expression            |+              |+              |SELECT IF(a\u003e2,a,b),SUM(a) |\n|Filter by Value                |+              |+              |WHERE a\u003e10                |\n|Filter by Expression           |+              |+              |WHERE a\u003e(b+10)            |\n|Group-Aggregate by Value       |+              |+              |GROUP BY a                |\n|Group-Aggregate by Expression  |+              |+              |GROUP BY (a+1)            |\n|Group-Having by Value          |+              |+              |HAVING count_a\u003e2          |\n|Group-Having by Expression     |+              |+              |HAVING (count_a+1)\u003e2      |\n|Order by Value                 |+              |+              |ORDER BY a desc           |\n|Order by Expression            |+              |+              |ORDER BY (a+b)            |\n|Window Functions               |-              |+              |                          |\n|Common Table Expressions       |-              |+              |                          |\n|Join                           |-              |+              |                          |\n\n## Performance\n\n* Dataset: 10,000,000 (10 Million)\n* Hardware: 16vCPUx16G KVM Cloud Instance\n* [Benchmark](benchmark)\n\n\n|Query |Cost(second)|\n|-------------------------------|---------------|\n| SELECT COUNT(id) FROM testdata | 0.269s |\n| SELECT COUNT(id) FROM testdata WHERE id!=0 | 0.438s |\n| SELECT SUM(data1) FROM testdata | 0.287s |\n| SELECT SUM(data1) AS sum, COUNT(data1) AS count, sum/count AS avg FROM testdata | 1.814s |\n| SELECT MAX(id), MIN(id) FROM testdata | 0.473s |\n| SELECT COUNT(data1) AS count, data1 FROM testdata GROUP BY data1 ORDER BY count DESC LIMIT 10 | 0.728s |\n| SELECT email FROM testdata WHERE email like '%20@example.com%' LIMIT 1 | 0.076s |\n| SELECT COUNT(email) FROM testdata WHERE email like '%20@example.com%' | 1.470s |\n| SELECT data1 AS x, x - 1, x - 2, x - 3, count(data1) AS c FROM testdata GROUP BY x, x - 1, x - 2, x - 3 ORDER BY c DESC LIMIT 10 | 2.396s |\n\n## Metrics\n\nhttp://localhost:8080/debug/metrics\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorengine%2Fvectorsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectorengine%2Fvectorsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorengine%2Fvectorsql/lists"}