Database delete of items

max.c

Joined: 2013-09-26
Posts: 3
Posted: Thu, 2013-09-26 08:01

Hi there,
I have a gallery3 install on shared hosting and over time it has grown pretty big. Overall there are 16,000 items with 8,000+ stuck in a single album. This has broken down Organize module on that album.

There are a lot of duplicates and unused items, which I would like to delete. Is it possible to delete them from database, as I can filter out the ID's of these items.

I was hoping to follow the following steps:
1. Bulk delete 3,000 items from database
2. Remove old files from maintenance
3. Fix gallery issues from maintenance
4. Praying for a fixed gallery.

Please suggest if this would work or if there is another way to go about it.

Thanks,
Max

 
max.c

Joined: 2013-09-26
Posts: 3
Posted: Thu, 2013-09-26 18:19

Ok, so did some more research on a virtual machine, for a test gallery fix your gallery option does recalculate left_ptr and right_ptr, so in theory it should be able to rescue the database after a delete. Remove unwanted files does not delete left over files, which will have to be deleted through some other way.

Although this seems to be working with a small install, can any one suggest if the same would work with a relatively big database.

Thanks,
Max

 
max.c

Joined: 2013-09-26
Posts: 3
Posted: Sun, 2013-09-29 13:57

After a lot of searching found out that the best way to delete a whole lot of items using their IDs is to call the REST API, a bit of programming came in handy and server is deleting all the unnecessary photos one by one. Hope this helps someone in the future.