Author Topic: SQL database update: some feedback  (Read 4129 times)

0 Members and 1 Guest are viewing this topic.

Offline SpinalBlood

SQL database update: some feedback
« on: 27 03 2021, 00:59:50 »
I updated to SQL driver and I have some feedback, not sure if others experienced these, although not severe issues:

- I don't know what is the reason but after updating, miranda startup is now slower. The first time it takes between 20-30 seconds; although with a brand new profile this doesn't seem to happen. It might be my pc, the size of the profile or the number of contacts but even so I don't think it was ever this slow before.

- The size of the profile from MDBX to SQL went from 520MB to 670MB (I tried to compact it before updating)

- I tried to compact it after the update too, it doesn't seem to change and... it crashes (it seems no crashlog is created though)

- In the profile manager, if a profile was opened, you could see it was being used by a red X mark icon. But it doesn't seem to work with SQL: the icon is like "free to open". Of course it wouldn't open two istances if you go ahead when it's already opened, but still; and the X icon was useful because it was showing when the profile was free, like when sometimes after closing miranda it was "flushing" the memory of miranda shutting down and the profile was still used/open until it finished, or during some occasional crashes the profile was still open and the icon helped you know that. And when it was free again, the icon usually updated on its own, without reopening the profile manager. If possible this should be addressed


However I have the impression than searching in history is now faster than before
« Last Edit: 27 03 2021, 01:01:35 by SpinalBlood »
 

Offline Vulpix

Re: SQL database update: some feedback
« Reply #1 on: 28 03 2021, 04:18:30 »
1) mdbx is really fast. Like, really fast. Even amongst general memory mapped databases, it is very fast. SQLite is anything but - it is not even really meant to be used this way.

The problem with MDBX however is that it's still being actively developed and that it is prone to randomly losing your data. Maybe not anymore, but especially the beginnings were very painful. What's "worse", in case you do lose your data somehow, you have to rely on MDBX's own data recovery, which may but also may not work. It is also not really possible to see the content of the database unless you reimplement the way Miranda accesses it.

With SQLite, there are billions of such tools for recovery, moreover the format is a lot more "stable" so to speak; and to top it off, you can take a look at the db contents anytime you want because it's just standard SQLite database.

As most people prefer data integrity over "speed", and after the many pains of MDBX, it was decided that SQLite is the way forward.

I'm sure there could be some improvements to startup times though (where a lot of random access to the "rather large" miranda database happens. I suppose this is a topic for discussion. Maybe MIranda could implement some kind of startup cache DB? :D A smaller profile with only the data Miranda needs at start? Who knows what the future will bring.

2) yes, SQLite db will on average be about as much bigger as you have seen. My profile was around 530MB and now it's 675MB.

3) Compacting works for me. Might be worth trying to reimport your profile (after making a backup).

 

Offline dartraiden

Re: SQL database update: some feedback
« Reply #2 on: 30 03 2021, 19:21:13 »
Quote
In the profile manager, if a profile was opened, you could see it was being used by a red X mark icon. But it doesn't seem to work with SQL
Fixed.
 

Offline dartraiden

Re: SQL database update: some feedback
« Reply #3 on: 30 03 2021, 19:21:45 »
Quote
- I tried to compact it after the update too, it doesn't seem to change and... it crashes (it seems no crashlog is created though)
You can try to crash it under Visual Studio (choose debug symbols path in Options - Debugging, first)
 

Offline SpinalBlood

Re: SQL database update: some feedback
« Reply #4 on: 01 05 2021, 10:22:57 »
Fixed.

Thanks!

You can try to crash it under Visual Studio (choose debug symbols path in Options - Debugging, first)

I'm not sure as I never used Visual studio, though I think it didn't crash all the attemps if I remember well. I might investigate

3) Compacting works for me. Might be worth trying to reimport your profile (after making a backup).

I also don't think I ever reimorted my own profile, but it's worth a try yes and I will try someday, thanks