SQL Database nearly 3 times the size after install

  • Posts: 10
  • Thank you received: 0
10 years 6 months ago #3761

After installing HikaShop and not adding any products, my database is now nearly 3 times larger.
Was 716k now is 1.7Mb.
Is this normal? I haven't added anything but just the HikaShop install. A bit worried about this.

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

  • Posts: 10
  • Thank you received: 0
10 years 6 months ago #3762

Ok, found the culprit:

hikashop_zone_link nearly half a meg nearly 4.500 records
hikashop_zone also huge and with nearly 4,500 records

This is crazy, I do not need all this.

I only sell in the US and do not want those huge records in my database for nothing!

Any way to get rid of this where it won't just install again on upgrade?

Thanks for any help.

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

  • Posts: 73080
  • Thank you received: 11164
  • MODERATOR
10 years 6 months ago #3763

When HikaShop is installed, it loads all the zones (countries and their states) in the database (5000 of them), plus all the currencies, and all the default data.
That's normal.

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

  • Posts: 73080
  • Thank you received: 11164
  • MODERATOR
10 years 6 months ago #3764

You can always delete them. But when you update they will be back in.

It's really useful for everyone selling abroad and if you don't use them, you can unpublish them. We do this because it's a nightmare to enter all that by hand when the software doesn't have the data already in it.

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

  • Posts: 10
  • Thank you received: 0
10 years 6 months ago #3769

So what would be the recommended method aside from manually altering my database? I see the use for these for other coutries though (I know the US isn't the only country on earth!)
When you say "unpublish" not sure if I am missing a way to do this.
Thanks for the quick response BTW!

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

  • Posts: 10
  • Thank you received: 0
10 years 6 months ago #3770

Sorry, but also, what would I delete just to be US only and make sure not to delete the states and all that in those two files.
I don't want to break the cart before I get a chance to use it!
Thanks.

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

  • Posts: 73080
  • Thank you received: 11164
  • MODERATOR
10 years 6 months ago #3772

You can go in the menu System->Zones. There, filter the listing to display only countries (top right dropdown) and display all the entries.
Click on the checkbox in the header of the listing to select all the countries. Then, click on the unpublish button.
Then, publish the USA.

Then, go to the configuration and set your main zone to the USA instead of "Rhone" so that if you use taxes, they will be applied based on that as long as the user doesn't enter/select his address after which taxes will be applied based on the address of the user.
Finally, go to Display->Custom fields so that the only country is USA and that it's the default value. And set the default state for the state field.

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

  • Posts: 10
  • Thank you received: 0
10 years 6 months ago #3774

Thanks, that did get rid of the references in the backend, but here is my question now.
Database is still the same size when I "unpublish" as they are still there.

You said before that it would be ok to delete all of these? (instead of Unpublish) and just keep the US for now. I don't want to create issues for keeping current or upgrading to the business version...
I assume when I upgrade, that is when they will all come back, but I could just delete them again. Also, will deleting from the backend get rid of both the
hikashop_zone_link and hikashop_zone files?

Not sure if it would really matter or slow things down, but it does slow down backups of my DB and every bit does count.

Thanks for the help

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

  • Posts: 73080
  • Thank you received: 11164
  • MODERATOR
10 years 6 months ago #3775

Unpublishing the zones has the advantage that you don't need to do anything when you update/upgrade.
If you delete the countries, you will have the countries deleted and most of the zone_link table will be empty. However, that won't delete the states themselves. So the zone table will still contains all the zones. You will have to delete the states as well.
You can do it through the interface 500 per 500. Please be careful to not delete the states of the USA or else you will have to enter them manually.
You can also delete them through the database it's the same.

You could also empty both tables and enter your country and the states yourself, but the whole point of having the default data there is to avoid having to go through that :)

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

  • Posts: 10
  • Thank you received: 0
10 years 6 months ago #3782

I'm no genius with SQL databases...
Honestly, having all those tables there shouldn't really make my site take a huge hit in performance would it?
It is basically a Jomsocial site (that is still local but I assume the database will grow immensely once I launch the site and have many users.
Maybe just better not to delete the tables and just leave them alone. Just don't like having the overhead.

Still is more to do a backup (which I have automated through Cron 4 times a day)

Decisions, decisions!

Thanks for the quick responses and I am very glad I chose this solution instead of going with VirtueMart with this site!

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

  • Posts: 73080
  • Thank you received: 11164
  • MODERATOR
10 years 6 months ago #3784

Having 1MB on tables in a database doesn't change nothing for mysql.
5000 entries in a table is a piece of cake. It gets thought when you go above 1000000.

Those zones tables won't grow at all. They are just there for ease of configuration. You should not delete the tables. You can remove the entries in it if you want but don't remove the tables or you will get errors in HikaShop.

Last edit: 10 years 6 months ago by nicolas.

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

  • Posts: 45
  • Thank you received: 0
10 years 6 months ago #3796

Hi,

if you unpublish them they won't be called during registration or adding an address so it will be fine. Unless you are going to host your site on your ipod or something don't worry about perfomance of such a small table. :)

I have a table over 200MB in one of my sites and everything runs smoothly.

Last edit: 10 years 6 months ago by afonic.

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

  • Posts: 10
  • Thank you received: 0
10 years 6 months ago #3811

Ah man!
You mean now I have to upgrade my server! :laugh: I loved being able to carry it in my pocket!
Yeah I think I will just keep them as is (being unpublished).

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

Time to create page: 0.100 seconds
Powered by Kunena Forum