I'm trying to unique row based on multiple columns combine and without using the index/key to do insert update duplicate row. What I need is like INSERT ... ON DUPLICATE KEY, but I can't add index due to the index size limit.
Here is my table design
Table : keyword_content
+--------------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+---------------------+------+-----+---------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| group_id | int(10) unsigned | NO | | NULL | |
| encoding | tinyint(3) unsigned | NO | | 0 | |
| content | text | NO | | NULL | |
| active_period | datetime | YES | | NULL | |
| status | tinyint(3) unsigned | NO | | 1 | |
| flag | tinyint(1) | YES | | 1 | |
| description | text | YES | | NULL | |
| updated_by | varchar(255) | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
+--------------------+---------------------+------+-----+---------+----------------+
Columns use for unique row are:
- group_id
- content
- status
I've also tried to handle the process in PHP by separate out what to insert/update, but it cause performance issue due to quantities of data import from spreadsheet.