Am using MySQL server and PHP for the programming side.
I have a table which stores only the id's and bar code of my products, and this table grows everyday,
when I scan a bar code from my front-end, I search for the barcode from this table first, with the ID’s obtained from this table I run another query and pass these ID’s into another table using IN condition and get the information of my products. Some of my products have the same bar-code with different description, hence I use this method.
It is holding good till now with 6000 codes, but will it be functional as it grows or do I need to optimise it in another way.
The speed and the number of rows seems good till now, I do a regular EXPLAIN condition to check if the query is checking unwanted rows.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.