Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the limitations and problems of Mycat slicing and the principles of slicing

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

How to understand the limitations and problems of Mycat slicing as well as the principles of slicing? in view of this problem, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

Limitations and problems of fragmentation:

The value of the fragment field cannot be changed.

Non-range slicing, it is difficult to expand capacity, and consistent Hash has only made some improvements.

Fragmentation causes the execution results of some SQL statements not to meet expectations, which can be regarded as unsupported

Fragmentation produces problems such as cross-fragment sorting and grouping statistics (memory consumption)

Fragmentation gives rise to table correlation problems

Fragmentation gives rise to distributed transaction problems

General principles of slicing:

The recording volume of each slice is about 10 million, and the number of slices is a double-edged sword, so it is not easy to have too many.

Sharded fields do not support the combination of multiple fields

In principle, the fields that are most frequently queried are fragmented fields.

The selection of sharding field affects the system performance to a great extent.

Query statements that are not shard fields will be sent concurrently to each shard, resulting in more resource consumption.

The restricted SQL in Mycat is as follows:

Insert into values (xxxx)

Insert into b select * from a

Lock table a

Select * from a where partionCol like "xxxx"

Select * from b where pationCol > 4 and pationC

< 10 ->

Between

Select * from a for update-> / *! mycat: sql = update a * /

The Join statement of any sharded table

Select a from An order by b

Select count (*) from A group by b

Select distinct a.* from a

If there are output parameters in the stored procedure, it is not supported at present

This is the answer to the question about how to understand the limitations and questions of Mycat slicing and the principle of slicing. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report