Re: How to have faster select?

2001-04-01 Thread Antonio Gulli
Read the manual, the most frequent words are stopped in index. Chai-Hup Chen wrote: > Hi, > Thanks a lot, the select is much faster now. But I find something > weird, it return nothing when match against the string "the", which > return 255568 entries when select "% the %", is it possible mys

Re: How to have faster select?

2001-03-31 Thread MikeBlezien
On Sat, 31 Mar 2001 12:39:59 -0800 (PST), Chai-Hup Chen <[EMAIL PROTECTED]> wrote: I think if you take a look at the MySQL docs on FULLTEXT it'll explain it alot better then I probably could. http://www.mysql.com/doc/M/y/MySQL_full-text_search.html >> Thanks a lot, the select is much faster

Re: How to have faster select?

2001-03-31 Thread Chai-Hup Chen
Hi, Thanks a lot, the select is much faster now. But I find something weird, it return nothing when match against the string "the", which return 255568 entries when select "% the %", is it possible mysql does not indexed some words for some reason? select count(*) from Books where match Title

Re: How to have faster select?

2001-03-31 Thread MikeBlezien
On Sat, 31 Mar 2001 11:46:54 -0800 (PST), Chai-Hup Chen <[EMAIL PROTECTED]> wrote: Try this: SELECT count(*) FROM Books WHERE MATCH Title AGAINST 'cisco' We use a FULLTEXT index search in a couple of our table for business referral searches, and it works like a charm! Hope this helps >>Hi,

Re: How to have faster select?

2001-03-31 Thread Chai-Hup Chen
Hi, Here is the fulltext index I add: CREATE TABLE Books ( isbn char(10) NOT NULL default '', Title char(255) NOT NULL default '', FULLTEXT KEY full_title (Title) ) TYPE=MyISAM; select count(*) from Books --> 2028971 select count(*) from Books where Title like "% cisco %" +-

Re: How to have faster select?

2001-03-29 Thread Antonio Gulli
Why don't use FULLTEXT index ? This select doesn't use normal index so you have a sort of linear search Chai-Hup Chen wrote: > Hi, > I find in our database, select "% string %" is very slow (>1 > minute). The database size have only 2M rows, any idea how could I get > faster response? Than

Re: How to have faster select?

2001-03-29 Thread Aigars Grins
> MySQL doesn't use a table index when doing a string search like %string%, > but it MAY use the index when doing something string%. Is there a way you > can change your search to do a "string starts with" instead of a "string > contains" ? This should help with MySQL using the index that you wa

RE: How to have faster select?

2001-03-29 Thread Sam Masiello
MySQL doesn't use a table index when doing a string search like %string%, but it MAY use the index when doing something string%. Is there a way you can change your search to do a "string starts with" instead of a "string contains" ? This should help with MySQL using the index that you want it t