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.
http://dev.mysql.com/doc/refman/5.5/en/load-data.
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 =
t
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 | subcat
spicially , 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 e
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.
http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_b