#Huge DB after migration to 2.0.0

1 messages · Page 1 of 1 (latest)

winter hearth
#

Hi,

can anyone help me on this problem?
https://github.com/immich-app/immich/discussions/22604
table_name | total_size

---------------------------+------------
smart_search | 1383 MB
face_search | 779 MB
assets | 299 MB
asset_files | 216 MB
geodata_places | 109 MB
exif | 93 MB
asset_faces | 65 MB
asset_job_status | 35 MB
tag_asset | 15 MB
naturalearth_countries | 8856 kB
person | 2824 kB
albums_assets_assets | 2400 kB
memories_assets_assets | 1528 kB
tags | 448 kB
tags_closure | 360 kB
memories | 264 kB
assets_audit | 184 kB
users | 96 kB
albums | 88 kB
sessions | 80 kB
albums_audit | 72 kB
libraries | 64 kB
api_keys | 64 kB
move_history | 64 kB
activity | 56 kB
shared_links | 48 kB
albums_shared_users_users | 40 kB
partners_audit | 32 kB
kysely_migrations | 32 kB
session_sync_checkpoints | 32 kB
notifications | 32 kB
version_history | 32 kB
album_users_audit | 32 kB
system_metadata | 32 kB
asset_stack | 32 kB
kysely_migrations_lock | 24 kB
audit | 24 kB
partners | 24 kB
shared_link__asset | 24 kB
user_metadata | 16 kB
users_audit | 16 kB
(41 rows)

We are talking about 1.5TB of photos and videos (mostly Photos)

final summitBOT
#

:wave: Hey @winter hearth,

Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich immich.

References

#

Checklist

I have...

  1. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :blue_square: read applicable release notes.
  3. :blue_square: reviewed the FAQs for known issues.
  4. :blue_square: reviewed Github for known issues.
  5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :blue_square: uploaded the relevant information (see below).
  7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

final summitBOT
quiet sierra
#

did you make a DB dump yet? how big is it

winter hearth
#

like this?
docker exec -t immich_postgres pg_dump -U immich immich > immich_dump.sql

quiet sierra
#

pg_dumpall

winter hearth
#

docker exec -t immich_postgres pg_dumpall -U immich immich > immich_dump.sql ?

final summitBOT
winter hearth
#

ok, I will try that tomorrow.
Is this in order to find the reason, or coudl this remove unneeded data from db?

#

(I understand that I would have to read in the dump after that)

quiet sierra
#

yeah you would have to restore the dump if it's smaller

winter hearth
#

compressed uncompressed ratio uncompressed_name
2336027943 6072254259 61.5% dump.sql

So it seems that there is not that much data. Still 6GB after dump.

quiet sierra
#

Still bigger than I would expect but I honestly don’t know how accurate the sizes shown in PG are
For 1.5TB of assets 6GB database seems normal