Skypeが重くなる問題を解決!会話ログを最適化

Apple

会話ログはsqliteで保存されているので、terminalで以下のコマンドを一発打つだけで最適化。
過去ログの検索がちょっと早くなったりする。かも。

echo "vacuum;" | sqlite3 /Users/matsu/Library/Application\ Support/Skype/*/main.db

補足

% sqlite3 "./Library/Application Support/Skype/matsugree/main.db" 
SQLite version 3.7.12 2012-04-03 19:43:07
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
Accounts        ChatMembers     Conversations   Participants    Videos        
Alerts          Chats           DbMeta          SMSes           Voicemails    
CallMembers     ContactGroups   LegacyMessages  Transfers     
Calls           Contacts        Messages        VideoMessages 
sqlite> .schema Messages
CREATE TABLE "Messages" (id INTEGER NOT NULL PRIMARY KEY, is_permanent INTEGER, convo_id INTEGER, chatname TEXT, author TEXT, from_dispname TEXT, author_was_live INTEGER, guid BLOB, dialog_partner TEXT, timestamp INTEGER, type INTEGER, sending_status INTEGER, consumption_status INTEGER, edited_by TEXT, edited_timestamp INTEGER, param_key INTEGER, param_value INTEGER, body_xml TEXT, identities TEXT, reason TEXT, leavereason INTEGER, participant_count INTEGER, error_code INTEGER, chatmsg_type INTEGER, chatmsg_status INTEGER, body_is_rawxml INTEGER, oldoptions INTEGER, newoptions INTEGER, newrole INTEGER, pk_id INTEGER, crc INTEGER, remote_id INTEGER, call_guid TEXT, extprop_chatmsg_ft_index_timestamp INTEGER, extprop_chatmsg_is_pending INTEGER);
CREATE INDEX IX_Messages_call_guid ON Messages (call_guid);
CREATE INDEX IX_Messages_convo_id_timestamp_consumption_status_sending_status ON Messages (convo_id, timestamp, consumption_status, sending_status);
CREATE INDEX IX_Messages_remote_id ON Messages (remote_id);
CREATE INDEX IX_Messages_timestamp_chatname ON Messages (timestamp, chatname);
CREATE INDEX IX_Messages_timestamp_convo_id_type ON Messages (timestamp, convo_id, type);
sqlite> 

Comments

タイトルとURLをコピーしました