Hello,
My mysql table has been created for long time, it increases day by day,
and become huge.
Right now a full scan to the table for the first time is very slow.
So I was thinking to optimize it.
This table is stored in many non-sequential disk fragments I think.
I want to make this table to be
hello,
I try to execute this sql in mysql shell,but got error as:
mysql select * from (select uin,count(*) as dd from active_users where
date = date_add(curdate(),interval -30 day) group by uin) where dd =3;
ERROR 1248 (42000): Every derived table must have its own alias
But I can execute
Add an alias for the subquery
select * from ( select ) my_alias where dd = 3;
Better, use a having clause and eliminate the subquery. Odds are it
will be more efficient in MySQL.
How to replace the original one with a having statement?
Thanks again.
Get the name you
Hello members,
I have two mysqld run on the same host (redhat linux OS with 2.4 kernel).
the two mysqld are in different versions, one is 4.0.20,another is 5.0.45.
the mysql 4.0.20 uses /etc/my.cnf as its config file,listening on default
3306 port.
the mysql 5.0.45 uses /etc/mysql5.cnf as its