Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 10.4.20
-
Fix Version/s: None
-
Component/s: Data Definition - Create Table
-
Labels:
-
Environment:CentOS 7
Description
we have 2 database with same structure
On this case database A can't used index when I run select query with specific where clause
but on database B with same query index used smoothly
I solved this issue with this step
- Backup Table on Database A
- Backup Data only on Database A
- Drop table on Database A
- create table on Database A using create script from Database B
- import data
after that table on Database A running using index
CREATE TABLE `tgospfeed` (
|
`id` int(11) NOT NULL AUTO_INCREMENT, |
`company_id` varchar(50) DEFAULT '', |
`company_code` varchar(50) DEFAULT '', |
`owner` varchar(50) DEFAULT '', |
`receiver` varchar(50) DEFAULT '', |
`type` varchar(255) DEFAULT NULL, |
`content` varchar(255) CHARACTER SET utf8 DEFAULT NULL, |
`picture` varchar(255) DEFAULT NULL, |
`flag` varchar(50) DEFAULT 'INBOX', |
`sent_notif` int(11) DEFAULT 0, |
`created_by` varchar(50) DEFAULT NULL, |
`created_date` datetime DEFAULT current_timestamp(),
|
`modified_by` varchar(50) DEFAULT NULL, |
`modified_date` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
PRIMARY KEY (`id`),
|
KEY `idx_tgospfeed_company_id` (`company_id`),
|
KEY `idx_tgospfeed_company_code` (`company_code`),
|
KEY `idx_tgospfeed_receiver` (`receiver`),
|
KEY `idx_tgospfeed_flag` (`flag`)
|
) ENGINE=InnoDB AUTO_INCREMENT=12916 DEFAULT CHARSET=utf8mb4 |