EN: |+| [Music] In this unit, we will talk about HTAP.
JA: |+|[音楽] このユニットでは、HTAPについて話します。


EN: |+| HTAP stands for Hybrid Transactional Analytic Processing.
JA: |+|HTAPは、Hybrid Transactional Analytic Processingの略称です。


EN: Just as the name suggests, |+| it is a hybrid solution or hybrid database that can handle two types of workloads, |+| OLTP and OLAP, at the same time.
JA: 名前が示すように、|+| 同時にOLTPとOLAPという2種類のワークロードを処理できる |+| 混合型ソリューションまたは混合型データベースです。


EN: |+| OLTP normally works with row based data, while OLAP is often biased towards columnar stores.
JA: |+|OLTPは通常、行ベースのデータで動作しますが、OLAPでは、通常、列指向ストアが好まれます。


EN: |+| The line between OLTP and OLAP is actually blurring, |+| but for the purposes of our discussion, let's assume that it's still the case.
JA: |+|OLTPとOLAPの間の境界は実際には曖昧になっていますが、|+|このディスカッションの目的のために、それがまだそのようなままであると仮定します。


EN: |+| We understand that disk IO is one of the most heavy lifting and time |+| consuming tasks for databases, and more IO means worse performance.
JA: |+|データベースにとってディスクI/Oは最も重い作業の1つであり、|+| I/Oが多いほどパフォーマンスが悪化することを理解しています。


EN: |+| Here is an hypothetical example to compare IO overhead between row based and a columnar |+| store.
JA: |+|ここに、行ベースと列指向ベースのIOオーバーヘッドを |+| 比較する仮想的な例があります。


EN: When inserting one row, row based storage need to access to one data block only, |+| while the column based data store requires access to three data blocks.
JA: 単一の行を挿入する場合、行ベースのストレージは1つのデータブロックにアクセスするだけで済みます。 |+| 一方、列ベースのデータストアは3つのデータブロックにアクセスする必要があります。


EN: |+| However, for the aggregations, row based storage requires access to three blocks, |+| while the column based storage only needs to scan one data block.
JA: |+|しかしながら、集計については、行ベースのストレージは3つのブロックへのアクセスが必要ですが、|+| カラムベースのストレージは1つのデータブロックをスキャンするだけで済みます。


EN: |+| The insertion example is a typical OLTP scenario |+| and the aggregation example is a typical OLAP scenario.
JA: |+|挿入の例は典型的なOLTPシナリオであり、|+| 集計の例は典型的なOLAPシナリオです。


EN: |+| This example tells us OLTP prefers row based storage, while OLAP prefers column based storage.
JA: |+|この例は、OLTPが行ベースのストレージを好む一方で、OLAPがカラムベースのストレージを好むことを示しています。


EN: |+| Of course data blocks accessing or scanning efficiency is not |+| the only difference between the two workloads.
JA: |+|当然ながら、データブロックへのアクセスやスキャンの効率性は2つのワークロード間の |+| 唯一の違いではありません。


EN: |+| It is not unusual when you try to trade off the performance for one |+| side in order to improve the performance for the other.
JA: |+|一方のパフォーマンスを向上させるために、もう一方のパフォーマンスを |+| 犠牲にすることは珍しくありません。


EN: |+| However, as long as two workloads exist in the same database on the same table, |+| you cannot make both happy simultaneously.
JA: |+|ただし、同じデータベースの同じテーブル内に2つのワークロードが存在する場合、|+|両方を同時に満たすことはできません。


EN: |+| They cannot share the same feeling on various configurations.
JA: |+|様々な構成において、同じ感覚を共有することはできません。


EN: For example, |+| for block size OLAP prefers large blocks, while OLTP prefers relatively small block size.
JA: |+|ブロックサイズを例にとると、OLAPは大きなブロックを好み、OLTPは相対的に小さなブロックサイズを好みます。


EN: |+| We already know that TiKV is a key-value store which is row based.
JA: |+| 私たちは既に、TiKVが行ベースのキーバリューストアであることを知っています。


EN: It is good for OLTP.
JA: OLTPには適しています。


EN: To |+| handle the OLAP problem, TiDB's solution is to add another server into the cluster called TiFlash.
JA: |+|OLAPの問題を解決するTiDBのソリューションは、TiFlashと呼ばれる別のサーバーをクラスタに追加することです。


EN: |+| TiFlash provides column based storage and relies on the same Raft algorithm |+| to replicate the data from TiKV in real time.
JA: |+|TiFlashは列ベースのストレージを提供し、TiKVと同じRaftを使い|+| TiKVからリアルタイムでデータをレプリケートします。


EN: |+| Replicating data to TiFlash does not block TiKV write operations.
JA: |+| TiFlashへのデータレプリケーションは、TiKVの書き込み操作をブロックしません。


EN: |+| It also provides consistent reads like TiKV and ensures that the latest the data is returned.
JA: |+| TiKVのように一貫性のある読み取りを提供し、確実に最新のデータが返されるようにします。


EN: |+| TiFlash joins Raft the group as a learner role, which means it will never become a leader.
JA: |+|TiFlashは、LearnerとしてRaftグループに参加します。これは、TiFlashが決してLeaderにならないことを意味します。


EN: |+| After the deployment, table data will not be synchronized to TiFlash by default.
JA: |+|デプロイ後、テーブルデータはデフォルトではTiFlashに同期されません。


EN: |+| The synchronization function needs to be explicitly enabled.
JA: |+|同期機能は明示的に有効にする必要があります。


EN: |+| With the engine's smart selection feature, |+| TiDB server can communicate with TiKV when dealing with OLTP workload and |+| fetch results from TiFlash in case the query performance could benefit from columnar store.
JA: |+|エンジンのスマート選択機能により、OLTPワークロードを処理する際に、|+| TiDBサーバーはTiKVと通信し、クエリのパフォーマンスが列指向ストアから利益を得られる場合には、|+| TiFlashから結果を取得できます。


EN: |+| We will cover how to use TiFlash in the training course named TiDB specific features.
JA: |+| 私たちは、TiDB固有の機能というトレーニングコースでTiFlashの使用方法について説明します。