mysql is really a slow rdbms

2001-02-25 Thread Muhammad Ilhami

This table contains more than 2.5 million records. I
created index on column  hari. It needs more than 3797
 secs, and have not finished yet.

Anybody has advice?

mysql describe tb_trafik_bulanan;
+---+--+--+-+-+---+
| Field | Type | Null | Key | Default
| Extra |
+---+--+--+-+-+---+
| thn   | smallint(5) unsigned | YES  | | NULL  |   
   |
| bln   | tinyint(3) unsigned  | YES  | | NULL  |   
   |
| hari  | tinyint(3) unsigned  | YES  | | NULL  |  
|
| id_hari   | int(10) unsigned  | YES  | | NULL |
  |
| kd_link   | char(4)   | YES  | | NULL |   |
| ip_asal   | int(10) unsigned  | YES  | MUL | NULL |
  |
| sip_asal  | char(19)  | YES  | | NULL |   |
| port_asal | smallint(5) unsigned | YES  | MUL | NULL
|   |
| ip_tujuan | int(10) unsigned  | YES  | MUL | NULL |  
|
| sip_tujuan| char(19)  | YES  | | NULL |   |
| port_tujuan   | smallint(5) unsigned | YES  | MUL |
NULL|   |
| jml_byte  | int(10) unsigned  | YES  | | NULL |   
   |
| jml_flow  | smallint(5) unsigned | YES  | | NULL
|   |
| jml_packet| int(10) unsigned  | YES  | | NULL | 
 |
| kd_neg| char(2)   | YES  | MUL | NULL |   |
| id_pelanggan  | char(8)   | YES  | MUL | NULL |  
|
| kd_jasa   | char(2)   | YES  | MUL | NULL |   |
| arah_dan_tipe | tinyint(3) unsigned   | YES  | MUL |
NULL|   |
| kd_server | char(2)  | YES  | MUL |
NULL|   |
| kd_non_server | char(2)   | YES  | MUL |
NULL|   |
+---+--+--+-+-+---+

mysql show processlist;
+++---+--+-+--+--+---+
| Id | User   | Host  | db   | Command | Time
| State| Info 
|
+++---+--+-+--+--+---+
| 31 | netmon | localhost | tracemon | Query   | 3797
| Repair with keycache | create index hari on
tb_trafik_bulanan (hari) |
| 40 | netmon | localhost | tracemon | Query   | 0   
| NULL | show processlist 
|
+++---+--+-+--+--+---+
2 rows in set (0.00 sec)


regards

-ilham-

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: mysql is really a slow rdbms

2001-02-25 Thread ryc

It is not that mysql it slow, its your database design and the fact you have
2.5 million records in the table.

It is not clear from your description of the problem what you are trying to
do, so giving advice is that much harder. If you are creating an index on
the column hari, it will take a long time. However this time is negligable
because you only do it once, and never again. But if you are talking about a
query that uses the column hari going slow, making it a key in the table
will speed up your query considerably.

Hope this helps.

 This table contains more than 2.5 million records. I
 created index on column  hari. It needs more than 3797
  secs, and have not finished yet.

 Anybody has advice?




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: mysql is really a slow rdbms

2001-02-25 Thread Teddy A Jasin

Just simple question.. why u designed it such a way that differentiate the
'thn','bln' and 'hari' field
when you can do it just using one field and using DATE type field instead of
integer.
and when you query u can use your SQL sorting to speed up searching.

Regards
Teddy

- Original Message -
From: "Muhammad Ilhami" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 26, 2001 12:41 PM
Subject: mysql is really a slow rdbms


 This table contains more than 2.5 million records. I
 created index on column  hari. It needs more than 3797
  secs, and have not finished yet.

 Anybody has advice?

 mysql describe tb_trafik_bulanan;
 +---+--+--+-+-+---+
 | Field | Type | Null | Key | Default
 | Extra |
 +---+--+--+-+-+---+
 | thn | smallint(5) unsigned | YES  | | NULL |
|
 | bln | tinyint(3) unsigned  | YES  | | NULL |
|
 | hari | tinyint(3) unsigned  | YES  | | NULL |
 |
 | id_hari | int(10) unsigned | YES  | | NULL |
   |
 | kd_link | char(4) | YES  | | NULL |   |
 | ip_asal | int(10) unsigned | YES  | MUL | NULL |
   |
 | sip_asal | char(19) | YES  | | NULL |   |
 | port_asal | smallint(5) unsigned | YES  | MUL | NULL
 |   |
 | ip_tujuan | int(10) unsigned | YES  | MUL | NULL |
 |
 | sip_tujuan | char(19) | YES  | | NULL |   |
 | port_tujuan   | smallint(5) unsigned | YES  | MUL |
 NULL |   |
 | jml_byte | int(10) unsigned | YES  | | NULL |
|
 | jml_flow | smallint(5) unsigned | YES  | | NULL
 |   |
 | jml_packet | int(10) unsigned | YES  | | NULL |
  |
 | kd_neg | char(2) | YES  | MUL | NULL |   |
 | id_pelanggan  | char(8) | YES  | MUL | NULL |
 |
 | kd_jasa | char(2) | YES  | MUL | NULL |   |
 | arah_dan_tipe | tinyint(3) unsigned | YES  | MUL |
 NULL |   |
 | kd_server | char(2)  | YES  | MUL |
 NULL |   |
 | kd_non_server | char(2) | YES  | MUL |
 NULL |   |
 +---+--+--+-+-+---+

 mysql show processlist;

+++---+--+-+--+-
-+---+
 | Id | User   | Host  | db   | Command | Time
 | State| Info
 |

+++---+--+-+--+-
-+---+
 | 31 | netmon | localhost | tracemon | Query   | 3797
 | Repair with keycache | create index hari on
 tb_trafik_bulanan (hari) |
 | 40 | netmon | localhost | tracemon | Query   | 0
 | NULL | show processlist
 |

+++---+--+-+--+-
-+---+
 2 rows in set (0.00 sec)


 regards

 -ilham-

 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail.
 http://personal.mail.yahoo.com/

 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php