Hi,
Im running a script where am I cross matching about 200 000 data sets with each other. Each data set consists of 8 parameters and I want to count all datasets which have similar or the same parameters for each data set.
Right now, I am doing the matching via a MySql query which im calling about 200 000 times. The problem is that using a query is extremely expensive… it takes up to 2 hours until the script is done. So I am wondering if there is a better method to cross match data sets and if some of could help me find a better solution.
While researching I found out that arrays may be a faster alternative to queries. And so far, I identified 3 possible ways for cross matching:
1. nested foreach () loops
foreach($array as ar1)
foreach($array as ar2)
if ($ar1[0] == $ar1[0])….
2. Using an Array_map with Callback function, so that i would have only one "hand coded" loop
foreach($array as arr)
if ($arr[0] == $parameter)….
3. Array walk where i could save one "hand coded" loop as well.
Theoretically would be the best/fastest way to go about it? Can Anyone tell me what technically the difference between those 3 ways is? And which one is the better approach or if there other alternatives to them?
I am thankful for any advice that helps me reduce execution time!
PHP Function Page Advice
Hi All, I am quite new to PHP and Javascript but have written an Online Shop (Mainly for Fun and education) It uses MySQL for the Shop Item Data and a 'Username.txt' file for each users cart.
License Issue - service type user
Hi,
Having Problem with Date
l have a submit buttom where user have the possibility to add a date to specify when his message should be made reachable online.I have seen a bug which l am not having a clue to solve and l need
problem in pagination when processing with selectbox form
Hi,I have a search form, with select boxes, if am selecting the value from the form, it works good, but when i am integrating the pagination script, it messed up.this is my script...please help me
Production Order Enterprise Service to Manufacturing Exctn Sys (MES) ???
Hello Experts,
A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the panel events but i want to add a button and when i press the button this events happen how can i do
php require help needed
Ok i tried to use the search funtion but the word require is everywhere.i'm really new to creating websites... I've built them in the past but allways had some sort of template to go off of from a
How do I get the row number from from an sql table query
Hi allI have a table that I query and it returns a number of rows.mysql_num_rows($query) = $totalI want to have next and previous buttons, is there a way of retrieving the current row number, and can
How to ... (FAQs)
... get e-mail notifications
no idea what to do...
I'm fed up. I had issues with code that I have working on a different site that didn't work on my current site. I found a way to fix that but now I'm running into the same error on another page that I