I have a MariaDB database that I try to optimize. The current table is 132 Million rows, and starts to be difficult to work with.
Investigating why INSERT are so slow on my table (InnoDB), I notice what looks like duplicates INDEX. Here is the output of SHOW INDEX
:
Table U Key_name S_ Column_nam Co Cardina Sub_pa Packed Nu Index_type Comment Index_comment
Twit 0 PRIMARY 1 ID_num A 123302998 NULL NULL BTREE
Twit 1 User_ID 1 User_ID A 408288 NULL NULL BTREE
Twit 1 Date_cr 1 Date_cr A 123302998 NULL NULL BTREE
Twit 1 User_ID_2 1 User_ID A 515912 NULL NULL BTREE
Twit 1 index_Orig 1 Original A 61651499 NULL NULL YES BTREE
I don't understand why the two INDEX on User_ID have different cardinality. Would there be a way to remove one of them Safely in order to speed-up INSERT queries?
Thanks.