Hi!
I've found this in:
http://www.mysql.com/information/presentations/presentation-oscon2000-20000719/
"Instead of doing a lot of |GROUP BY|s on a big table, create summary tables of the big table and query this instead."


Would you please tell me how to create "summary tables" that can help me get this query info:
mysql> select tel, telefb, rutaentran, rutasalien, sum(minutos) from traf_oper group by 1, 2, 3, 4;


This is the table info:
mysql> describe traf_oper;
+------------+----------+-------------------+------+-----+---------+-------+
| Field      | Type     | Collation         | Null | Key | Default | Extra |
+------------+----------+-------------------+------+-----+---------+-------+
| tel        | char(8)  | latin1_swedish_ci | YES  | MUL | NULL    |       |
| fecha      | char(8)  | latin1_swedish_ci | YES  |     | NULL    |       |
| hora       | char(6)  | latin1_swedish_ci | YES  |     | NULL    |       |
| telefb     | char(14) | latin1_swedish_ci | YES  | MUL | NULL    |       |
| tiempotasa | char(6)  | latin1_swedish_ci | YES  |     | NULL    |       |
| rutasalien | char(7)  | latin1_swedish_ci | YES  |     | NULL    |       |
| rutaentran | char(7)  | latin1_swedish_ci | YES  |     | NULL    |       |
| serie      | char(3)  | latin1_swedish_ci | YES  |     | NULL    |       |
| tipotraf   | int(1)   | binary            | YES  |     | NULL    |       |
| minutos    | int(4)   | binary            | YES  |     | NULL    |       |
+------------+----------+-------------------+------+-----+---------+-------+


Thanks in advance, Hector


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to