Modifying the DB

mnhende2's Avatar

mnhende2

11 Jan, 2014 09:07 PM

Hello Fellow Anki Users,

I hoping that someone out there has experience with modifying the database and may be able to give me a bit of help here.

I have some review history in my database that isn't mine. I'm assuming it is from a shared deck or cards I got from friends. It is fairly obvious because when I look at my statistics and when I click on the 'lifetime" option there are a few data points that exist about one year before I started using Anki, which skews my lifetime graphs.

I'm trying to identify those cards and then delete those early review records for those cards. I'm assuming this isn't particularly difficult, I just don't know how to do it.

So I have downloaded SQLite Browser, and can open the database. But I don't know exactly what column I'm looking for, nor exactly how to identify the time stamp.

I "assume" I go to the "Revlog" table, where I currently have 345,539 entries. So that feels like the correct place, and I assume I am looking at the "time" column. However, the time column sometimes has two digits, sometimes three, sometimes four, sometimes five. So, I'm not sure on that.

Anyhow, I assume I just need to find the correct column, presumably sort by that column, find the earliest entries, delete those, and be good to go. (And before deleting I can double check, by looking at the card or note ID, going into Anki, finding that card, looking at the history of it, and verifying that I'm dealing with a card that has usage data that wasn't mine.)

Of course in all of this, I'm just working with a copy of my file in case anything goes wrong.

I've attached a screen capture of the DB as shown in SQLite Browser.

Thanks in advance if anyone is able to help me accomplish this.

Best,
mnhende2 (Matthew)

  1. Support Staff 1 Posted by Damien Elmes on 12 Jan, 2014 03:21 AM

    Damien Elmes's Avatar

    You can work out the time for a record by dividing the ID by 1000 and then
    placing the number on http://www.unixtimestamp.com/index.php

    If you delete any records, please make sure to force a full sync afterwards.

  2. Soren Bjornstad closed this discussion on 07 Feb, 2014 04:08 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac