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
Tag: query-optimization
Speed-up/Optimise MySQL statement – finding a new row that hasn’t been selected before
First a bit of background about the tables & DB. I have a MySQL db with a few tables in: films: Contains all film/series info with netflixid as a unique primary key. users: Contains user info “ratingid” is a unique primary key rating: Contains ALL user rating info, netflixid and a unique primary key of a compound “netflixid-userid” This statement
Having trouble optimizing MySQL query with GROUP BY … HAVING
I’m trying to optimize quickly optimize the search functionality of some outdated forum software written in PHP. I’ve got my work down to a query that looks like this: word1 and word2 are examples; there could be any number of words. The number at the very end of the query is the total number of words. The idea is that