[arch-general] Implement sql/sqlite database for pacman local database

Alive 4ever alive4ever at live.com
Sat Oct 22 03:18:15 UTC 2016


On Fri, Oct 21, 2016 at 11:44:42PM +0200, G. Schlisio wrote:
> optimisation ideas to the pacman database are (nearly) as old as this
> distribution, but none ever really convinced many.
> if you go back through the archives of the mailinglists and forums (as
> well as the outer parts of the interwebs) you will find many similar ideas.
> i specifically remember an approach to read the database once on
> startup, and store it in a ramfs. hat its disadvantages as well…
> 
> for all actions regarding the database, i strongly advise you to do a
> full backup of the whole database before tinkering with it.
> 
> my advice: get a SSD drive for your system, that makes the pacman
> database lightning fast, but your data is as safe as can be.
>
> georg
> 

I suggest this idea thinking that pacman can be improvised further.

Sql queries should be faster than doing 'grep' over thousands of files,
regardless of the underlying filesystem. This is just one reason of why
sql is invented.

The cons of using sql is it adds more complexity and more dependency.
Instead of just extracting .mtree, desc, and files to
/var/lib/pacman/local/ subdirectories, a more complex sql query should
be performed to update local database.

If pacman developers chooses simplicity over speed, text files make
sense. If speed is preferred, sql database makes more sense, although
the complexity to implement might be the reason to not implement this
feature.

I want to discuss this so that if more people get interested in this
feature, it would make sense to implement it.

http://stackoverflow.com/questions/2356851/database-vs-flat-files
http://dba.stackexchange.com/questions/23124/whats-better-faster-mysql-or-filesystem



More information about the arch-general mailing list