Page 1 of 1

How do you delete data from the sqlite map.db?

PostPosted: Mon Sep 12, 2016 16:14
by lightonflux
Hi there,

on a server we have the problem that the map grows to big. So we would like to remove everything above 1k and below 1k or so.

How does the query has to look? SQL, CLI or simple python are things i can understand. :)

I am a bit confused about the structure as in one of my map.dbs it just one table blocks with two columns "pos" and "data".

Re: How do you delete data from the sqlite map.db?

PostPosted: Mon Sep 12, 2016 16:52
by taikedz
Is the problem that the database file is too big really? Or is it that you are running out of space on the server, and maybe you have too many uncompressed log files, or other files elsewhere?

Manually editing a database is a recipe for pain in most applications, and dropping core data should not really be the first course of action to resolve a problem.....!

Re: How do you delete data from the sqlite map.db?

PostPosted: Tue Sep 13, 2016 10:01
by Naj
Maybe you'll find some useful information there : viewtopic.php?f=3&t=9774

Re: How do you delete data from the sqlite map.db?

PostPosted: Fri Sep 16, 2016 14:31
by benrob0329
Python 3 has a built in SqlIte library, you could use interactive mode and edit it.

I potentially could try to write a script, though I don't really know SQL (I don't think its difficult)

Re: How do you delete data from the sqlite map.db?

PostPosted: Sat Sep 17, 2016 12:56
by lightonflux
taikedz wrote:Is the problem that the database file is too big really?


It is 24GB big.

Re: How do you delete data from the sqlite map.db?

PostPosted: Sat Sep 17, 2016 12:58
by lightonflux
Naj wrote:Maybe you'll find some useful information there : viewtopic.php?f=3&t=9774


Thanks a lot!