Skip to content
Advertisement

Tag: query-optimization

One big update query, or several single update queries, to update a value in MySQL multi-tenant database

I’m working in a ‘point of sale’ application (PHP + MySQL), with products, sales, product quantity that have to be updated (+ or -) depending on the operation (sale/buy), etc. On every sale/buy, I save the operation data (date, customer, totals…) in an ‘invoices’ table, and the details (all products in the invoice) in a ‘invoicecontents’ table. Ok, you got

Advertisement