blay Posted November 30, 2002 Posted November 30, 2002 I have asked this question in other php/mysql forums and people don't know or aren't sure and someone told me about this area. I realize this forum is for the oscommerce site but I was hoping that someone here might be able to answer my question. I have a php script that searches a mysql database. My question is how many databases can php search through at once. I have a client who wants to create 1 database for every store he has. Right now he has 50 stores and he/I want to know if it is possible to tell php to do a search through all the databases. All the database are stored on one machine. Does anyone know what the limit is? Can php search through say 1000+ databases? Any help would be great. Thanks.
mattice Posted November 30, 2002 Posted November 30, 2002 It could search through all the databases but you are limited by the execution time (php.ini) and memory limit (php.ini) of script. Changing those to higher values will get you started but you will find you will need a custom solution in the form of ONE database dedicated to solely searching at a certain point. I am in no way a search engine expert but I am quite sure that will be a way better solution then running the same query on 1000+ db's. HTH Mattice "Politics is the art of preventing people from taking part in affairs which properly concern them"
Guest Posted November 30, 2002 Posted November 30, 2002 You can search one database at a time since there aren't really any logical join points. PHP is very procedural meaning each script can do one thing at a time. Even if you could search 1000's of databases at a time, you most likely would kill the MySQL server if they have any number of records in each table. What you could do is create a single database for searching that has all the products from the 50 stores. Along with these products you have a store id and its product id from its original store. Then when someone finds what they are looking for you can redirect them to the proper store. Would require another database but the end result would be much faster.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.