• Resolved code222

    (@code222)


    I noticed that woocommerce despite the latest releases to optimize the database structure still has many structural optimization issues.

    If you try to create a simple post-product with only the title and the price (custom field) woocommerce will create in the post_meta table as many as 32 row that for the most part will be empty.

    This makes the database very huge when there are a large number of products.

    Example: when creating a virtual product, woocommerce creates 4 custom fields that are very useless _weight, _length, _width, _height as a virtual product has no size and weight.

    Many other custom field are obsolete like the ones just mentioned, would not it be better to write on the database only the fields that have a value ? why are fields written that have nothing inside, making the database slow ?

    moreover, many of the fields that are written could be enclosed in an array and saved in a single custom field, because what is not done ?

    Have you already encountered this problem ? exist a solution ?

    this is the row that woocommerce create without never value inside, when create a simple product, so they are not necessary:

    _wc_review_count 
    _wc_rating_count 
    _wc_average_rating 
    _edit_lock 
    _edit_last 
    _sku 
    _regular_price 
    _sale_price 
    _sale_price_dates_from 
    _sale_price_dates_to 
    total_sales 
    _tax_status 
    _tax_class 
    _manage_stock 
    _backorders 
    _sold_individually 
    _weight 
    _length 
    _width 
    _height 
    _upsell_ids 
    _crosssell_ids 
    _purchase_note 
    _default_attributes 
    _virtual 
    _downloadable 
    _product_image_gallery 
    _download_limit 
    _download_expiry 
    _stock 
    _stock_status 
    _product_version

    I also opened in the “ideas” section of
    woocommerce this request:
    http://ideas.woocommerce.com/forums/133476-woocommerce/suggestions/34144924-database-optmization

    If you think it’s a real problem, put +1

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support con

    (@conschneider)

    Engineer

    Hello there,

    And thank you for your input. Posting this in the ideas board is a good start, however if you have also written a code suggestion and can demonstrate its value on a vanilla install, you can also make a suggestion in our GitHub repository.
    Please make sure to provide your code for us to review so we can take a look.

    Kind regards,

    I was thinking that this problem is well known and that a future release of woocommerce will fix this ? Is it hopeless or Automattic Happiness Engineer just doesn’t know ?

    Plugin Support RK a11n

    (@riaanknoetze)

    Hey There 🙂

    I was thinking that this problem is well known and that a future release of woocommerce will fix this ?

    I’m speaking under correction here, but I believe that also has to do with the CSV importer that forms part of the core plugin. All of those fields will be set – whether that’s by saving the post as per normal or when a product is imported (even when the CSV columns are empty).

    Is it hopeless or Automattic Happiness Engineer just doesn’t know ?

    Neither 🙂

    It’s because Happiness Engineers aren’t responsible for the development decisions being taken. To get in touch with our devs directly, especially when you have DB optimisation ideas, have a look at https://github.com/woocommerce/woocommerce

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Database Optimization Issue’ is closed to new replies.