Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6236
38242 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: Aug 11, 2006, 12:01:51 PM »
for example this query need several records to execute 300.000 records
SELECT ip_country.country AS variable, COUNT(*) AS value FROM visits AS tbl LEFT JOIN ip2nationCountries AS ip_country ON ip_country.code = tbl.country WHERE tbl.country <> ''
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6236
38242 credits Members referred : 374
It's time to use PHP5!
« Reply #5 on: Aug 11, 2006, 12:17:04 PM »
yes that's true the sql statement wasn't complete:
SELECT ip_country.country AS variable, COUNT(*) AS value FROM visits AS tbl LEFT JOIN ip2nationCountries AS ip_country ON ip_country.code = tbl.country WHERE tbl.country <> '' AND hostname = 'www.finalwebsites.com' GROUP BY tbl.country ORDER BY value DESC LIMIT 0, 10
I'm using group, but how to optimize the table with joins I have only two tables...