How much of a database (mysql) does Gallery2 use?
I'm about to buy a hosting plan that offers 50 MB of mysql database. Are thumbnails held in database as blobs or as files?
How big will be the database with 5 galleries, each of 200 files?
Thanks,
-Dentharg
Posts: 32509
g2 stores metatada and sessions in the database.
thumbnails, images, ... are all stored on disk, not in the database.
50 mb should be more than enough for 5 such small galleries.
Posts: 1
Where gallery2 stores images in the database? i need to get direct access to them.
Posts: 32509
> i need to get direct access to them.
what kind of access?
they're stored in g2data/albums/, but that folder is not web-accessible. use the G2 URLs to access the files that you've uploaded to G2.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 7
I have a question too. I hold a gallery containing about 10,000 pic and 10,000 PV, the database size is 60MB. That's huge, isn't it? And it's growing quickling since I found it only about 30MB one week ago. Any ideas?
Posts: 16504
Don't know what "PV" is. Gallery does not store images or any binary data in the database. Have you optimized your database recently? Site Admin > Maintenance
I don't have nearly that many photos in my Gallerys (yet) so I don't have a clue how big the database should be with that many images. One factor would be just how much data are you storing and what plugins and themes you have installed? EXIF data, comments, etc? If you do have commenting enabled I'd be checking that. If you're getting heavily spammed that could be one source of a growing DB.
One of my G2 installs has a database of 1.33MB with just over 500 images. If everything is linear, at 20,000 items (still don't know what PV is) I should be sitting at about 50MB for my DB size. Again, if everything is linear, which it's most likely not. Since the install I'm looking at is still pretty small and there's the initial size of the DB of about 200KB, IIRC. So I might actually have a DB closer to 40MB with 20,000 items in my Gallery.
I don't store or display EXIF info, no comments, only have the plugins installed that I use and once I'm done playing will only have 1 theme installed.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 7
PV refers to Page View by visitors.
I optimized the database and it turned out to be 40MB.
An table named "g2_CacheMap" in the database takes up about 30MB. Just want to know what it is.
Actually, I don't really care how big the database can be since the space for mysql is unlimited, but when something happened to the database, I really need to backup sometime. And the max upload size for a backup database can only be 10MB (in ZIP mode, 40MB SQL files is compressed into 7MB) and that's really hurt.
Posts: 4342
You don't need to backup the cacheMap table, the sessionMap table or the lock table (see G2.3RC1 modules/core/classes/GalleryStorage/GalleryDatabaseExport.class, line 48)
The cachemap table caches the results of complex/expensive db queries to make future page loads faster. It doesn't contain any information that isn't elsewhere in the db. You can empty it (TRUNCATE...) any time, at the expense of slowing down repeated page loads as the cache contents are rebuilt.