Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Database Table Size

  • 18-08-2003 03:56PM
    #1
    Closed Accounts Posts: 536 ✭✭✭


    I have a database table where every 10(ish) seconds I update the entry with the uptime of the system.

    Problem is, is that the size of the table increases slightly every time I update the entry. And over a period of time the size of the table gets large. E.g. I after running over the weekend the table was 5MB in size and when I compacted it it went back down to 100KB. there is only one row in the table.

    Is there anyway I can prevent the size from increasing without using compact?

    I'm using Mckoi database as an embedded db in a java (1.4) appliation.


Comments

  • Registered Users, Registered Users 2 Posts: 4,276 ✭✭✭damnyanks


    Do you need to store all those entrys or just need the most upto date one ?


  • Closed Accounts Posts: 536 ✭✭✭flyz


    Originally posted by damnyanks
    Do you need to store all those entrys or just need the most upto date one ?

    I only have one entry in the table with a couple of columns and I update the uptime column periodically. The rest of the table stays the same.
    I don't actually add new entries I just update what is already there.


  • Closed Accounts Posts: 5,563 ✭✭✭Typedef


    If you're doing an update on a single row that starts out at 100k and has nothing but a few fields changing, hitting 5mb, then you have a db error.

    Try sqlite or tbh, if all this db is doing is logging uptime, try a flat file, ffs.


  • Closed Accounts Posts: 536 ✭✭✭flyz


    Originally posted by Typedef
    If you're doing an update on a single row that starts out at 100k and has nothing but a few fields changing, hitting 5mb, then you have a db error.

    Try sqlite or tbh, if all this db is doing is logging uptime, try a flat file, ffs.

    K thanks I'll look into it.

    that's only one part of my db. that's only one table.
    It does a lot more than just storing uptime .


Advertisement