I have created a new piwigo database and reloaded some of my pictures. Currently at around 250K. The performance of creating thumbnails decreased quite a bit. I added an index on the path column for the table piwigo_images.
Is this safe long term? I was wondering whether to remove it once my rebuild is complete. Performance is now much faster.
Offline
Sounds like a sensible column to index. Maybe you could submit a PR to add the index? I guess the only drama with you having a local difference like that might be that one day Piwigo will add an index there but call it something else and so an upgrade process wouldn't necessarily notice yours and create another.
Offline
Observed about a 10x increase in creation of thumbnails with this index set. Also, mysql cpu usage dropped to about a 10th.
Offline
Hello,
Seams very interesting, could you elaborate a bit and share this subject with us.
I'm newbie and I would be keen to get a detailed explanation.
Thnaks a lot
DéHème
Sorry for my frenglish.
Offline
The mysql query using "path" to the <db>_images table was taking around half a second (ish). I have a 255K images in my library. Adding the index to the "path" field significantly improved the query. Roughly it went from 1-2 per second to 10-12 per second. And top on the server indicated a big drop in mysql cpu usage.
Offline
Thanks,
I'm a bit dumb, I still dont understand what is the modification and where to apply it.
If it is such an improvement the "patch" should be largely shared.
I've only 50k images by ftp but the derivative generation is always too long!
DéHème
Offline
Sorry,
You'll need access to the database, for instance using mysql CLI or a GUI tool. The command is:
ALTER TABLE piwigo_images ADD KEY images_path_rp (path);
where images_path_rp can be any name.
Offline
any downsides to this, or reasons why it shouldn't be included in Piwigo core?
Offline