Understanding the revlog table

I posted before about modifying the db so that an old deck can be brought into my FSRS profile, but never got round to it. (It needs modifying because I wasn’t using the buttons the way you’re supposed to, which means FSRS can’t use my review history.)

I notice that all cards that have been manually rescheduled since January 2024 have identical values for ivl and Lastivl. For instance I rescheduled one for 25 days from now and the revlog entry says:

[rev id] [card id] -1 0 103 103 2500 0 4

Is this how it should be? If I go back before January 2024 (which could well be the last time I updated Anki) suddenly all the values are different.

Is there anywhere else that the manually scheduled interval would be recorded?

I’d encourage you not to try modifying the revlog directly unless you really know what you’re doing. At the very least, you should have a working knowledge of the database structure and what dependencies there are between the tables.

Since you’re doing this to try to work with FSRS, you might also want to consider that the FSRS doesn’t use current or past intervals in its computations. So there wouldn’t be much benefit to changing those.

If your problem is as simple as “misuse” of Hard (for incorrect answers instead of just for correct answers) – have you thought about trying the existing solutions first? A feature was added to the FSRS Helper add-on that converts those Hard’s in the deck history to Again’s – Reddit - Dive into anything – which is at least worth a shot.

There is also the “ignore reviews before” option, which will work best if you are still introducing New cards in that deck. But if not, it will at least give you a clean slate to start using FSRS with the default parameters.

Thanks. I hadn’t realized all that info on the database structure was available on github. I should have found it myself.

I guess when a card is manually set the due date changes but not the interval, which explains they’re the same… but when I look at the due date for that same card (set to 25 days) it says 1690. If I search in the browser for cards due in 25 days, there it is.

Since you’re doing this to try to work with FSRS, you might also want to consider that the FSRS doesn’t use current or past intervals in its computations. So there wouldn’t be much benefit to changing those.

If your problem is as simple as “misuse” of Hard (for incorrect answers instead of just for correct answers) – have you thought about trying the existing solutions first? A feature was added to the FSRS Helper add-on that converts those Hard’s in the deck history to Again’s – Reddit - Dive into anything – which is at least worth a shot.

I did use Hard that way sometimes but there are also a lot of cards that have been manually rescheduled time and time again, so I would need to extend that approach to cover them. The problem is you can’t tell what button they should be changed to unless you can compare the interval / due date before and after rescheduling. One card might have had an interval of a year and been rescheduled to 14 days (not sure whether that should be Hard or Again), another card might be the other way round (so I guess Easy). So I’m not sure if I need to change this data, but I do need to look at it in order to change the button code (ease value) in the revlog table. My understanding is that FSRS looks at when the card was reviewed and which button was pressed, but can’t do anything if the button code / ease value is 0, which it is for manually rescheduled cards.

Now that I read the info on your link I see that the db doesn’t work quite the way I thought and actually the rescheduled date for past reviews isn’t captured because rescheduling doesn’t change the ival value in the revlog table and the due value in the card table is a current value. But you can still work out more or less what the new due date was by looking at when the card was next reviewed. For cards that were rescheduled last time they came up, I would have thought you could just look at the current due date, but as I say the card that is due in 25 days has a due value of 1690 (in the card table) and I haven’t understood that yet.

Also, don’t I need to change the interval to reflect the rescheduled due date? Say the interval is one year but the due date [I set on the previous review was] 14 days. If I switch to FSRS and the algorithm sees the card answered correctly after 14 days, it will want to increase the interval from one year when I want it to increase it from 14 days. I will see this on the buttons and manually reschedule, and then I’m back in the same loop I’m trying to get out of.

Did you not change the intervals when using Set due date?

I’m not completely sure about SDD’s behaviour but I think you can use the “n!” to set the interval to n. I only know this doesn’t work for new cards.

Did you not change the intervals when using Set due date?

I had assumed that setting the due date worked by adjusting the interval so that the card fell due on the scheduled date. It looks like it used to but this changed either because I switched to a different scheduler or because I updated Anki, and from then on the interval stayed the same and only the due date changed (you are rescheduling this review, not answering the card and scheduling the next review). I have only just realized this but it explains why I have been using set due date so much. Say I have a card that I barely remember and it gives me hard 1.5 years good 2.5 years. I don’t want to fail it and have 10 reps in the next week but I don’t want to wait 1.5 years either, so I manually reschedule it for 20 days. When it comes back after 20 days I want the options to be maybe hard 35 days good 50 days but since the interval hasn’t changed I get 1.5 years and 2.5 years, so I manually reschedule it again, and so it goes on.

You can add a ! after the number to see if that does anything.

1 Like

Gotcha. Now I look it even says that in the dialog box. So probably what happened in January is just that I got out of the habit of adding the !. So given a bit of time I will be able to stop constantly using SDD but I still need to figure out how to bring it in to my FSRS profile.