Hi,
you have to use `HAVING' instead of `WHERE' like this.
SELECT DISTINCT
`term`,
COUNT(*) AS count
FROM blp_sql_distinct_temp_table
GROUP BY `term`
HAVING count = 5
ORDER BY count DESC;
put `HAVING' next of `GROUP BY'.
`WHERE' behaves at before aggregate of `GROUP BY'.
your SQL means like
Hello,
I am designing a solution which will need me to import from CSV, i am using
my JAVA code to parse. CSV file has 500K rows, and i need to do it thrice
an hour, for 10 hours a day.
try to use `LOAD DATA INFILE' to import from CSV file.
Pesebe-san,
I'm sorry to i'm not clear what do you want to do.
do you mean like this? (exampled by Perl)
#---
use DBI;
$cn = DBI-connect(DBI:mysql:test,root,);
$st = $cn-prepare(SELECT t1.name AS cat,GROUP_CONCAT(t2.name) AS
subcat FROM `table` AS t1 LEFT JOIN `table` AS t2 ON t1.id =
Hello Pesebe-san,
how about this?
SELECT
t1.name AS cat,
GROUP_CONCAT(t2.name) AS subcat
FROM table AS t1
LEFT JOIN table AS t2 ON t1.id = t2.parentid
WHERE t1.parentid = 0 GROUP BY cat;
+---+---+
| cat | subcat|
+---+---+
| cat A |
Hello,
I seem your mysqld doesn't use enough memory.
Date Time CPU% RSS VSZ
2012/5/22 21:00:39 109 294752 540028
if your mysqld uses InnoDB oftenly,
edit innodb_buffer_pool_size in you my.cnf.
, on MyISAM.
I will consider the tuning of innodb_buffer_pool_size as well.
Do you know the tips for how to tune the disk access for MyISAM?
Thanks,
Yu
Tsubasa Tanaka さんは書きました:
Hello,
I seem your mysqld doesn't use enough memory.
Date Time CPU% RSS VSZ
2012/5/22 21:00:39 109