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 does the Sequoiadb database modify the storage engine to Sequoiadb for tables with the same primary key and unique index key?

2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly explains how Sequoiadb database modifies the storage engine to Sequoiadb for tables with the same primary key and unique index key. Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "Sequoiadb database how to modify the storage engine to Sequoiadb for tables with the same primary key and unique index key"!

[Problem Description]

Connect mysql instances with Nivacat. Import a batch of tables via data transfer and modify the engine for these tables to sequoiadb. One of them failed to modify the table, error 40291 from storage engine.

The table statement is:

CREATE TABLE 'sys_district'(

'id' int(11) NOT NULL COMMENT 'three-level linkage-district county-level table',

'city_id' int(11) DEFAULT NULL COMMENT 'city id',

'district_name' varchar(100) DEFAULT NULL COMMENT 'district name',

'short_name' varchar(40) DEFAULT NULL COMMENT 'short',

'create_time' varchar(40) DEFAULT NULL COMMENT 'create time',

'update_time' varchar(40) DEFAULT NULL COMMENT 'update time',

PRIMARYKEY('id'),

UNIQUE KEY 'sys_district_id' ('id') USING BTREE,

KEY 'sys_district_city_id' ('city_id') USING BTREE,

KEY 'sys_district_distruct_name' ('distruct_name') USING BTREE

ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='District County-level table;

[Solution]

40291 Error-291 for Sequoiadb (-291: There is already an index that can handle this scene).

As can be seen from the table creation statement, the primary key 'id'(PRIMARYKEY ('id ')) and the unique index'id'(UNIQUE KEY 'sys_district_id'('id') are duplicates.

At this point, I believe everyone has a deeper understanding of "Sequoiadb database how to modify the storage engine for Sequoiadb tables with the same primary key and unique index key." Let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

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