MySQL Forums
Forum List  »  MyISAM

MyISAM, Select and MoveFirst
Posted by: M Karim
Date: July 13, 2006 03:37AM

I have installed MySQL 4.1 and created two tables, type (MyISAM Storage Engine)

TABLE1 has 200000 records
----------------------------------------
1st column:
----------------
Column name "item"
Datatype "INTEGER" "AUTOINCREMENT"
index name "PRIMARY"
index kind "PRIMARY"
index type "BTREE"

2nd column:
----------------
Column name "text"
Datatype "TEXT"
index name "text"
index kind "FULLTEXT"
index type "DEFAULT"

TABLE2 has 1000 records
------------------------------------
1st column:
----------------
Column name "item"
Datatype "INTEGER"
index name "item"
index kind "INDEX"
index type "BTREE"

My questions are:

1)
I used INNER JOIN in MySQL Query as follows:

SELECT * FROM TABLE1 INNER JOIN TABLE2 ON TABLE1.item = TABLE2.item WHERE TABLE1.text LIKE "%keyword%" LIMIT 0, 10;

I found it takes about 25 msec, when the keyword is "mini":

SELECT * FROM TABLE1 INNER JOIN TABLE2 ON TABLE1.item = TABLE2.item WHERE TABLE1.text LIKE "%mini%" LIMIT 0, 10;

But it takes about 1.5 sec, when the keyword is "karim":

SELECT * FROM TABLE1 INNER JOIN TABLE2 ON TABLE1.item = TABLE2.item WHERE TABLE1.text LIKE "%karim%" LIMIT 0, 10;

2)
When I use recordset.MoveFirst with keyword "mini", it takes about 29 msec.
But again recordset.MoveFirst with keyword "karim" takes about 1.5 sec.

Thanks in advance,

Best Regards,

Options: ReplyQuote


Subject
Views
Written By
Posted
MyISAM, Select and MoveFirst
4664
July 13, 2006 03:37AM
2115
July 13, 2006 07:35AM
1566
July 13, 2006 05:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.