Lightroon: Does the catalog stay clean after removal of photos?

  • 1
  • Question
  • Updated 5 years ago
  • (Edited)
I am testing the behavior of the catalog, especially if it stays ‘clean’ when removing photos from the catalog. To test this, I removed all photos from the catalog, so it should be empty. However, I noticed that the size of the database did not decrease. Optimizing the catalog initially did not decrease the catalog size. The catalog size did increase significantly after I applied optimizing the catalog again. However, the catalog was left with thousands of empty directories. Actually, I doubt if the ‘cleaning management’ of the catalog is sufficient. Will I not be left with a very ‘polluted’ catalog after some time of working, still storing the remnants and traces of removed photos?
Photo of Jan Hoogendoorn

Jan Hoogendoorn

  • 9 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of jdv

jdv, Champion

  • 728 Posts
  • 55 Reply Likes
DB size does not grow and shrink in perfect alignment with items inserted or dropped from it. I know of no RDBMS with any sort of non-trivial schema where this would be so. The size of the DB involves not only the size of new extents, and the reclamation of extents, but metadata growth, column width adjustments, etc.

More to the point, SQLite does not always prune empty nodes because they are part of the metadata schema. The notion is that they will eventually be used again, and creating/unlinking structure like this adds significant overhead to something like an insert.
Photo of Alban LEROUX

Alban LEROUX

  • 48 Posts
  • 0 Reply Likes
Perhaps there is a way to do a sort of : sqlite filename 'VACUUM'

Does catalog optimization do that ?
Photo of Jan Hoogendoorn

Jan Hoogendoorn

  • 9 Posts
  • 0 Reply Likes
Note: I noticed an error in the sentence "The catalog size did increase significantly after I applied optimizing the catalog again". "increase" must be "decrease".
Photo of Dorin Nicolaescu-Musteață

Dorin Nicolaescu-Musteață, Champion

  • 703 Posts
  • 38 Reply Likes
Optimizing the catalog initially did not decrease the catalog size. The catalog size did increase significantly after I applied optimizing the catalog again.

Are you talking about catalog only or catalog + preview cache?
Photo of Jan Hoogendoorn

Jan Hoogendoorn

  • 9 Posts
  • 0 Reply Likes
I don't know. I don't think the preview cache is a part of the catalog, is it?

Note that "size did increase significantly" in the sentence you quoted must be "size did decrease significantly".
Photo of Dorin Nicolaescu-Musteață

Dorin Nicolaescu-Musteață, Champion

  • 703 Posts
  • 38 Reply Likes
Ah, then it's clear.