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

Considerations when using Amoeba as Proxy for MySQL

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

(1). Amoeba does not support transactions

Currently, Amoeba does not support transactions, and any SQL statements related to transactions will be blocked by Amoeba. If you must use a transaction, and all processing operations within a transaction can be routed to the same MySQL, you can consider using a transaction for processing in a stored procedure. In addition, Amoeba is expected to support transactions in the future.

(2). Amoeba does not support cross-library join and sorting

Join and sorting across libraries are very resource-consuming and can lead to serious performance degradation, which is not supported by Amoeba.

(3) .insert statement must specify the column name of the table

Amoeba is parsed according to the SQL statement, and if there are no keywords in the sharding rule in the SQL statement, then Amoeba will not split horizontally according to the rule. For example, when data is split horizontally according to city ID, the following statement will not be segmented correctly:

INSERT INTO tb_Shop VALUES ('name of the shop', 'address of the store', 1meme '2011-07-30')

The following statements can be segmented correctly:

INSERT INTO tb_Shop (Shop_ID,ity_ID,ShopName,Address,ShopStatus,CreateTime) VALUES (1meme 5pint 'name of the shop', 'address of the shop', 1pr'07-30')

That is, the keyword City_ID in the sharding rule must appear in the SQL statement.

(4). Amoeba does not support subdatabase and table.

Amoeba does not support sub-database and sub-table, only MySQL instances.

(5). Amoeba does not support queries with large amounts of data.

Queries with large amounts of data consume a lot of memory, and the performance of Amoeba is very poor when querying with large amounts of data. Of course, the actual business needs to do a large amount of data query will be very little or no need to achieve this situation. Here, the so-called large data query refers to a query result of more than 100, 000 rows.

(6) .Amoeba needs stricter SQL statement specification.

If the From keyword is not followed by a subquery, it cannot have parentheses "()".

If the field name in the table is the same as the keyword or function name, you need to take the character `(for example: mytable.`order`).

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

Database

Wechat

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

12
Report