This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[ SOLVED ] - Database maintenance

Tags: essential essential essential
(comma "," separated)
rzeta
Registered Member
Posts
38
Karma
0
OS

[ SOLVED ] - Database maintenance

Wed Aug 02, 2017 8:56 am
Goodmorning everyone..
Last night using Kmymoney on W10, entering a subdivision into a scheduled operation, the program crashed.
Luckily this morning the same database (shared and saved on dropbox), on the linux machine, hasn't problem.

I regularly run backups, but I have a doubt ...
Does the kmynoney database have any limits?
I mean .. I have In 4 years, and several thousand records ...

Is it necessary to occasionally store records and compact the database, or any other kind of maintenance??

Last edited by rzeta on Wed Jan 24, 2018 7:38 pm, edited 1 time in total.
rzeta
Registered Member
Posts
38
Karma
0
OS

Re: Database maintenance

Fri Aug 04, 2017 12:52 pm
Anybody has idea about?
rzeta
Registered Member
Posts
38
Karma
0
OS

Re: Database maintenance

Tue Aug 08, 2017 5:44 pm
No one helps me?

If I wanted to archive the 2012 and 2013 movements, what should I do?
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: Database maintenance

Sun Aug 27, 2017 3:03 pm
Are you using the 'database' backend (real SQL server or SQLITE) or the 'file' backend (XML storage)?

Either way, currently archiving a set of transactions is not (really) supported. The workaround would be to make a copy of the data file and delete transactions that don't belong in them. For any successive file you will have to adjust the opening balances manually.

There is certainly no limit on the number of records (other than your RAM can fit). I have 15 years in more than 17.000 splits here and add daily to it.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
rzeta
Registered Member
Posts
38
Karma
0
OS

Re: Database maintenance

Sat Jan 20, 2018 4:01 pm
Excuse me.... I thought no one answered and I didn't check again.
ipwizard wrote:Are you using the 'database' backend (real SQL server or SQLITE) or the 'file' backend (XML storage)?

I'm not able to answer...
If you tell me where to look, I can try to tell you this.

My situation is this
Image
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: Database maintenance

Sun Jan 21, 2018 8:59 am
This tells us something about the amount of data you have stored, not the type of storage used. In general this seems to be about 1/3 of the amount of data I have stored.
To get information about the storage type you use, proceed as follows:
  • Start KMyMoney and load your data as usual
  • Look at the top frame of the application. You will see the name of the storage followed by a dash and the word KMyMoney.
  • In case the name ends in .xml or .kmy it is likely that you use file storage.
  • In case it ends in .sql it is likely to be a database backend. In that case, the list that is shown when you select File/Open Recent gives more information about the actual driver used.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
rzeta
Registered Member
Posts
38
Karma
0
OS

Re: Database maintenance

Tue Jan 23, 2018 7:40 pm
ipwizard wrote:]In case the name ends in .xml or .kmy it is likely that you use file storage.

Well! In the top there is the file name that is .Kmy as an extension.

With this information and my previous image What do you think about my database?
Generally you recommend some maintenance operations to me.?
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: Database maintenance

Tue Jan 23, 2018 8:02 pm
Not really, unless you encounter massive speed/performance issues.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
rzeta
Registered Member
Posts
38
Karma
0
OS

Re: Database maintenance

Wed Jan 24, 2018 9:49 am
ipwizard wrote:Not really, unless you encounter massive speed/performance issues.

Very well so now then.

If I still want to reduce the size of my database, for example by completely removing the years 2013 and/or 2014, I don't think there is any storage function.
I simply have to delete the records and then how can I compact the database?
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: Database maintenance  Topic is solved

Wed Jan 24, 2018 2:23 pm
Well, what you have to do is something like the following (don't blame it on me if something is missing):
  1. make a backup
  2. get a report for the last day you want to get rid of. The balances of the accounts are important, as you need them in one of the following steps
  3. get a report for today (you need this to verify the numbers are still correct once you are through with this)
  4. Mark all transactions you want to delete
  5. Delete them
  6. Repeat steps d and e for all accounts
  7. Adjust the opening balances of all accounts to the ending balance of the report taken in step b.
  8. Make sure your numbers are equal to the ones on the report crafted in step c.
  9. If something does not match: fix it.
  10. Save your data
There's no need to compact anything as you have a single file. The compaction happens with step j. automagically. If anything goes crazy, use your backup to continue.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
rzeta
Registered Member
Posts
38
Karma
0
OS

Re: Database maintenance

Wed Jan 24, 2018 7:33 pm
I couldn't hope to be helped better.
Fantastic!
Thank you for everything.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]