|
| |||||||
![]() | Welcome to iWEBTOOL Talk, where you talk about
webmaster-related stuff.
1 Register
2 Browse the board
3 Discuss whatever may interest you! | |||||||||||||
![]() |
| | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| Junior Member Join Date: Apr 2007
Posts: 11
![]() | Is it possible to improve text searches? How do other guys achieve FAST searches on their sites? I have tried two queries but both take 20+ seconds on a database of 2million. 20.957493 seconds 7,603 records Code:
Above query is using LIKE. 20.945299 seconds 7,537 records Code:
Above query is using MySQL recommended MATCH still not much improvement.
__________________ PDA Comparison - from online stores including amazon and ebay |
| |
|
| |||||||
| | #2 |
| Contributor Join Date: Jun 2006 Location: Denver
Posts: 4,459
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Try using a full-text index. http://www.phpfreaks.com/tutorials/129/0.php I don't know much about it, so you'll have to read up on it. Also, with that big of a table, do you have a dedicated MySQL server? You should consider it. There was something that I was reading once about making the full-text index permanently resident in the servers memory. But like I said, I don't know a lot about that. |
| |
| | #3 |
| Junior Member Join Date: Apr 2007
Posts: 11
![]() | Thanks. I am looking into this tutorial. We are on dedicated server. However we dont have a separate dedicated server for MySQL.
__________________ PDA Comparison - from online stores including amazon and ebay |
| |
| | #4 | |
| Junior Member Join Date: Apr 2007
Posts: 11
![]() | It explains all about fulltext and that we have already done. I think we have covered everything as far as php or MYSQL query is concerned. The only problem is that it is still too slow. Now the question is, what else can be done to speed things up. Quote:
| |
| |
| | #5 |
| Contributor Join Date: Jun 2006 Location: Denver
Posts: 4,459
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Here is an excerpt from a MySQL book :: High Performance MySQL :: http://dev.mysql.com/books/hpmysql-excerpts/ch06.html |
| |
| | #6 |
| Member Join Date: Apr 2007
Posts: 219
![]() | Btw. Did you removed duplicated entries in your tables? |
| |
| | #7 |
| Junior Member Join Date: Apr 2007
Posts: 11
![]() | @jumpenjuhosaphat: Thanks for the link. I have gone through it but the topic need more time and input. I will read more carefully. May be this is the answer I am looking for. @coderpl: Product names are usually (almost certain) unique. But in anycase, what is duplicates effect? |
| |
| | #8 |
| Member Join Date: May 2007
Posts: 125
![]() | just create index in the tables... (C.ID ,P.CATEGORY_ID )
__________________ |
| |
| | #9 |
| Junior Member Join Date: Apr 2007
Posts: 11
![]() | C.ID is the primary key so I guess is automatically indexed. P.CATEGORY_ID is indexed already. |
| |
| | #10 |
| Member Join Date: May 2007
Posts: 125
![]() | ( P.TITLE LIKE '%football%' ) OR ( P.DETAIL LIKE '%football%' ) it's the reason that for delay... never use 'or' in querry..... you can use 'union'....
__________________ |
| |
| | #11 |
| Junior Member Join Date: Apr 2007
Posts: 11
![]() | Can you please tell how to use Union for text search?
__________________ PDA Comparison - from online stores including amazon and ebay |
| |
(Threads which have no activity for more than 30 days are automatically closed.) |
| Quick Reply | ||
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| XML to MYSQL | djjase | MySQL | 1 | 04-05-2007 06:51 PM |
| All ForumsPR6 Text Link on a Busy Search Engine (Special $10 pm) | burf.com | Links for Sale | 3 | 12-18-2006 09:26 PM |
| MSSQL or MySQL? | loon | Web Hosting | 3 | 11-20-2006 10:43 AM |
| MySql | jumpenjuhosaphat | PHP | 6 | 07-10-2006 10:04 PM |