Is there a way to clean up the Hikashop product database?

  • Posts: 88
  • Thank you received: 5
  • Hikashop Business
5 hours 59 minutes ago #371779

-- HikaShop version -- : 6.4,1
-- Joomla version -- : 5.4.5
-- PHP version -- : 8.2.30

My client's shop has been running for years now and the amount of products in HikaShop has grown steadily all that time. Right now the shop contains about 3600 products, many of which have 5 to 15 variants. Because of this my database is becoming quite large (currently around 1.2 GB), and this is starting to give memory issues on my server when doing things like product exports or generating a site map.
I have already asked the client to go though their products and delete any that are no longer needed, but this does not really fix the issue.
So my question is: are old products entries removed from the Hikashop database tables when they are deleted from the administrator console? And, if this is not the case, is there a way to clean up the product database, by removing any data that is no longer relevant?

Please Log in or Create an account to join the conversation.

  • Posts: 85551
  • Thank you received: 14000
  • MODERATOR
1 hour 49 minutes ago #371782

Hi,

3600*~10 variants is only less than 50 000 entries in the hikashop_product.
That's not what is eating your database memory. It shouldn't take more than a few MB. Normally, variants don't have a description and just use the description of their main product, and the description is the main thing eating the memory for a product entry.

The first thing to do is to open your PHPMyAdmin and check the number of entries for each table in the database and the size of each table. I would wager the problem is elsewhere, in another table.
For example, if you've been running HikaShop for years with the Email history plugin activated without a "number of days" set in its settings, the email log table in the database has been steadily growing without any cleanup of its data. The emails take quite a bit of space individually, so if you have hundreds of thousands of them, that could take a significant share of the pie.
It's been a while now that this setting has been added with it's default set to 30 days. But if you updated from an old version, it's possible that you still have that setting empty.

But it could be something else entirely. I'm just talking about the email history because that's something that happened to someone else in the past. Anyways, what to do next depends on what you find in the database.

Please Log in or Create an account to join the conversation.

Time to create page: 0.052 seconds
Powered by Kunena Forum