I have a MySQL table:
CREATE TABLE responses ( id INT NOT NULL AUTO_INCREMENT, other_id INT NOT NULL, details TEXT, deleted BOOLEAN, PRIMARY KEY (id) );
Users can delete entries in responses.
responses
My plan is to use the field deletedto implement the deletion. Every time a user deletes a record, I set deletedto 1.
deleted
1
From time to time I can get rid of all deleted records or archive them. I am thinking about using split to make it faster:
PARTITION BY LIST(deleted) ( PARTITION pActive VALUES IN (0), PARTITION pDeleted VALUES IN (1) );
My question is, will this make the action slower? Now, when I change the record to the βremoteβ field, MySQL will have to move the record to a completely different section. It seems like it can be slow.
Any suggestions are welcome.
, , , . / , , , .
, , , .
, , , . , . , , , , , , "" , , . , .
, , . ( ), .
. , , . , , - , ββ, , "" ( , ). false ? , , 2 ? deleted ? , .
Source: https://habr.com/ru/post/1773434/More articles:Mac OS: uninstalling an old erlang installation - erlangFixng unused formal parameter warnings without creating an abstract class - c ++Getting the exact location using CLLocationManager - iosHow to remove erlang r16b from mac os x - erlangThe loop and character in the int variable do not work as I expect - c ++How can I schedule a beep? - objective-cwhat is the right web math editor for writing a formula on an asp.net page? - mathDecision Tree Learning Algorithm - algorithmYou can use setValuesForKeysWithDictionary with a nested dictionary - objective-cDrawing a rounded triangle in Blend - silverlightAll Articles