TIFlash OOM Caused by a Specific SQL Query

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TIFlash 因为某条SQL导致OOM

| username: TiDBer_vZIeuSNY

[TiDB Usage Environment] Production Environment
[TiDB Version] v6.5.3
[Encountered Problem: Problem Phenomenon and Impact]
TIFlash has been continuously restarting for a certain period. Monitoring revealed that memory consumption was extremely high before the restart, and logs also recorded OOM (Out of Memory) events.
Upon investigation, it was found that a Cartesian join in a particular SQL query caused TIFlash to use a large amount of memory, leading to OOM.
Is it possible to set a memory usage limit for a single SQL query in TIFlash?

| username: 小龙虾爱大龙虾 | Original post link

Let’s solve the Cartesian product issue first. Tiflash performs calculations in memory, right?

| username: TiDBer_vZIeuSNY | Original post link

The main goal is to limit the memory consumption of a single SQL query to prevent any instance anomalies caused by a particular SQL query.

| username: DBAER | Original post link

These two are fine, they are the parameters of ClickHouse.

| username: TiDBer_vZIeuSNY | Original post link

Thank you!

| username: TiDBer_嘎嘣脆 | Original post link

The document has parameters.

| username: TiDBer_HErMeXDz | Original post link

Use indexes to optimize Cartesian joins.

| username: 呢莫不爱吃鱼 | Original post link

Learned.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.