Questions tagged [tidb]

TiDB is an open-source distributed SQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads. It's MySQL compatible and features horizontal scalability, strong consistency, and high availability.

TiDB (/’taɪdiːbi:/, "Ti" stands for Titanium) is an open-source distributed SQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads. It's MySQL compatible and features horizontal scalability, strong consistency, and high availability.

TiDB provides users with a one-stop database solution that covers Online Transactional Processing (OLTP), Online Analytical Processing (OLAP), and HTAP services. It's suitable for various use cases that require high availability and strong consistency with large-scale data.

Key features

  • Horizontally scaling out or scaling in easily
  • Financial-grade high availability
  • Real-time HTAP
  • Cloud-native distributed database
  • Compatible with the MySQL 5.7 protocol and MySQL ecosystem

Deployment

Use cases

TiDB applies to the following use cases:

  • Financial industry scenarios with high requirements for data consistency, reliability, availability, scalability, and disaster tolerance
  • Massive data and high concurrency scenarios with high requirements for storage capacity, scalability, and concurrency
  • Real-time HTAP scenarios
  • Data aggregation and secondary processing scenarios

See also the case studies on the official website.

Learning resources

Check out TiDB courses

Related tags

  • - Distributed key-value database based on the design of Google Spanner and HBase. It is TiDB's storage engine.
  • - The metadata managing component of the entire TiDB cluster

Useful links

89 questions
0
votes
1 answer

Increased replication in TiKV cluster, but storage use did not increase after applying

I am running a TiKV v7.2.0 cluster, which was deployed with tiup with server_configs.pd.replication.max-replicas: 1 configured in topology. After storing about 8TB of data in the cluster, I edited the config to increase max-replicas to 2 with tiup…
Mike B
  • 1
0
votes
1 answer

tidb-lightning.toml got permission denied in WSL

I tried to upload my SQL files to TiDB Cluster via tidb-lightning.toml, and here is the result of my nohup.out: tiup is checking updates for component tidb-lightning ... Starting component `tidb-lightning`: /tidb-lightning/v7.0.0/tidb-lightning…
Darryl RN
  • 7,432
  • 4
  • 26
  • 46
0
votes
1 answer

TiDB executing full table scan

I am using TiDB version 6.5.1, I wanted to know the behavior of TiKV, let's say I have a table t which contains composite index example (a,b), when I am trying to execute following cases, 1.select sum(c) from t where a=123 and b='simple' group by…
Ajay
  • 47
  • 4
0
votes
1 answer

TiKV is sufficient for both OLTP and OLAP workloads?

I have an requirement to maintain big data sets in a single database and it should support both OLTP & OLAP workloads, I saw TiDB it will support HTAP workloads but we need to maintain data in TiKV & TiFlash to achieve full HTAP solution, since two…
Ajay
  • 47
  • 4
0
votes
1 answer

SELECT query on TiDB/TiFlash fails with ERROR 1105 (HY000) when running against a replicated table

We run a TiDB cluster consisting of twelve nodes. The TiDB version is 6.5.0. We have recently added a TiFlash node in order to enable HTAP/analytics processing. Replicating a table appears to work fine. The information_schema.tiflash_replica table…
0
votes
2 answers

How to execute the same SELECT statement for every element in a set, and union the results?

In TiDB, how can I execute the same SELECT statement for every element of a set and union the results? E.g. suppose I have this query which takes given_id and returns <= 3 ids: SELECT id FROM my_table WHERE id > given_id ORDER BY id LIMIT…
emchristiansen
  • 3,550
  • 3
  • 26
  • 40
0
votes
1 answer

TiDB as metastore for hive

Is somebody using TiDB as metastore for hive installation? Looking for experience and testimonials as we are evaluating it to solve our current metastore bottleneck while using mysql.
Shakti Garg
  • 263
  • 3
  • 15
0
votes
2 answers

Create a tidb database on docker compose

I have a docker-compose.yml file with the tidb container setup like this ti-db: image: pingcap/tidb container_name: ti-db ports: - 4000:4000 logging: driver: none volumes: - ./storage/tidb:/var/lib/mysql …
0
votes
1 answer

how to remove ghost peers from a failed TiDB scale-in operation

I scaled in a TiDB cluster a few weeks ago to remove a misbehaving TiKV peer. The peer refused to tombstone even after a full week so I turned the server itself off, left a few days to see if there were any issues, and then ran a forced scale-in to…
Kae Verens
  • 4,076
  • 3
  • 21
  • 41
0
votes
1 answer

tidb cannot fuzzy query with like '_' for double byte character?

In my program, I want to lookup "测试" with select * from test where name like '测_'; After my test, I found that MySQL can, but tidb can't?
0
votes
0 answers

Migrate ENUM columns from mysql to TiDB

I met a problem when migrate data ( by TiDB DM) from mysql I have a table in mysql which have a enum columns: `xxx` enum('offer','payment') NOT NULL DEFAULT 'offer', I create a migration task, the dump and load progress were complete, but I met…
Quyen Le
  • 1
  • 2
0
votes
1 answer

TiDB single drainer architecture is creating a single point of failure

We’re trying to create Master-Master replication between two TiDB clusters. Each cluster has 3 PD server, 4 KV servers and 2 TiDB server. TiDB is running with binlog enabled. On TiDB servers we have also installed pump. Now we came to installing…
0
votes
1 answer

What different betweent optimistic and pessimistic in tikv?

When I use tikv api, and I found it has an option in TxnKV client, then I test it, but I can not find what the difference between optimistic and pessimistic is in tikv? The test code is this: func begin() kv.Transaction{ transaction, err :=…
0
votes
1 answer

TiDB indexes are not getting used for queries

I'm using mysql connector to connect with TiDB. I have found that indexes are not getting used in my queries. After my analysis i have found that due to casting indexes were not used. E.g CREATE TABLE Employee ( ID BIGINT NOT NULL AUTO_INCREMENT…
suresh rajput
  • 169
  • 2
  • 9
0
votes
1 answer

Getting Readiness problem failed due to connection refused in tidb pods only in tidb cluster

We have been running tidb cluster in k8s. and its working fine since. But suddenly i am getting following issue only in new statsfull pods tidb-tidb-1 after scaling tidb-tidb statsfulset. Interestingly tidb-tidb-2 is running. All others pd and tikv…
Taybur Rahman
  • 1,347
  • 8
  • 20