Jump to content

Can I delate pr_stock_mvt table?


Recommended Posts

Hi all!

I was doing the periodic cleaning of prestashop tables related to statistics (pr_guest, pr_connections, etc.) when I saw that the "pr_stock_mvt" table is very large (9.5 Mb).

From the name of the table I guessed that it records the stock movements that occur when selling a product, although I have deactivated the advanced stock control. 

However, the strange thing is that there are days that in the same second many new entries are registered all at once with most of the parameters set to NULL (id_order, id_supply_order, referer) or to 0 (price_te, last_wa, current_wa). It doesn't match the orders. A few days can go by with no new records and then suddenly 100 appear all at once at the same time.

My question is, is this behaviour normal? And, above all, can I delete this table that keeps growing? 

Thanks a lot for your support,

Regards
Xabi

Link to comment
Share on other sites

Hi @Mikein, according to Prestashop tables related to statistics, and unecessaries collected data we strongly recommend to unistall following modules if you use an external analysis system like Google Analytics. Because somes data will be redondant, and made the dabase growing with huge data.

  • pagesnotfound
  • statsdata
  • statslive

For ps_stock_mvt nul or 0 values are normal when you add or remove stock quantity, you create an entry with no order reference. If you disabled stock managment this table is no more used.

Edited by Prestashop Addict (see edit history)
Link to comment
Share on other sites

6 hours ago, Prestashop Addict said:

For ps_stock_mvt nul or 0 values are normal when you add or remove stock quantity, you create an entry with no order reference. If you disabled stock managment this table is no more used.

That is the thing, I have stock management disabled from the beginning in "Configuration -> Shop parameters -> Product configuration -> Activate stock management: No"

That's why I find it strange that this table is growing all the time. But as I said, it doesn't coincide with an entry or exit of stock, it goes days without entries and suddenly 20 or 30 with NULL and 0 values are added at the same time. 

Link to comment
Share on other sites

il y a une heure, Mikein a dit :

That's why I find it strange that this table is growing all the time. But as I said, it doesn't coincide with an entry or exit of stock, it goes days without entries and suddenly 20 or 30 with NULL and 0 values are added at the same time. 

May be you have a module that doesn't check if stock managment option is activated or not!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...