2021/10/18

mysql explain

 explain someSql;
      possible_keys show useable keys

explain select a from b  use index (c) where xxx ;

show index from tableA;

create index someIndex  on someTable(someColumn);

drop index  someIndex on someTable;

*************************** 1. row ***************************

           id: 1

  select_type: SIMPLE

        table: some table

   partitions: NULL

         type: ALL

possible_keys: PRIMARY

          key: NULL

      key_len: NULL

          ref: NULL

         rows: 2972

     filtered: 1.11

        Extra: Using where

2021/04/22

insert ignore

 INSERT IGNORE INTO users (userid,username) VALUES (2,'swan'),(4,'bear') ;

---
Query OK, 1 row affected, 1 warning (0.02 sec)
Records: 2  Duplicates: 1  Warnings: 1