简体   繁体   中英

SQL Query optimisation for PS

I am currently creating my webshop for my local parts store using prestashop 1.7.8.6

I developed scripts on myself and have successfully made the website work correctly.

But, with 2 millions rows of products including each 30 columns and multiple joins, i can't have a decent loading time on getProducts query.

Even with indexes and cache...

I use a simple query on prestashop product table and join id products from car filter table to match ps_product table.

I would like to know if it would be better to create tables for each vehicle using an id, and fill it with ps_product data, to use this table only instead of using multiple joins.

I'am using innoDB as engine.

Thanks

Prestashop does not have great performance with such a huge amount of data/products, as you have seen using native methods, so the best option is to strengthen your MySQL server.

Consider using one or more dedicated machines for SQL with replication), by saving your data in external tables or store it to some distributed NoSQL system built to deal with large amount of data (like Elasticsearch or similar) so you can scale it easily and you can write your own code/module to retrieve what you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM