I'm migrating from Visual FoxPro (I'm a newbie).
On a daily basis I need to run this query on a table with a little more than
5 million records.
+ MS Visual FoxPro 6.0
select tel, telefb, rutaentran, rutasalien, sum(minutos) as minutos from traf_oper
group by 1, 2, 3, 4 into table oper_grp
This took about 173 seconds (let's say 3 minutes)
+ MySQL 4.1.0-alpha-max-nt
mysql> create table oper_grp select tel, telefb, rutaentran, rutasalien,
-> sum(minutos) as minutos from traf_oper group by 1, 2, 3, 4;
Query OK, 3301017 rows affected (8 hours 36 min 48.83 sec) --->>> 516 minutes!
Records: 3301017 Duplicates: 0 Warnings: 0
Why is there such a big difference?! Any optimization tips I could follow? Thanks in advance, Hector
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]