Results 1 to 25 of 26
Thread: MySQL -
Hybrid View
-
9th October 2010 00:25 #1
MySQL -
.
( ).
!
2- , , :
50 , 2 , . , 0.005.:Code:SELECT `id` FROM `table` WHERE MATCH(`title`, `body`) AGAINST ('dumanekva' IN BOOLEAN MODE) = 1
5 , 3 ( >= 3...)Code:SELECT `id` FROM `table` WHERE MATCH(`title`, `body`) AGAINST ('dumanekva' IN BOOLEAN MODE) >= 1
, .
ps - - ... sql-.. ..
Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
9th October 2010 01:42 #2
, Fulltext search boolean mode , fulltext index?
MySQL :
"They can work even without a FULLTEXT index, although a search executed in this fashion would be quite slow. "
- . , - , repair optimize .
! - !
''? * *
- !
...
-
10th October 2010 00:54 #3
-
10th October 2010 14:59 #4
.
50 , 1 , , , 5 , 49995 .
, 4000 ( , 2 , 0.0005
)
.
- , .
Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
10th October 2010 16:12 #5
"=1" .
MATCH...AGAINST. , relevance, BOOLEAN MODE, 0 1. 3 , relevance 0, 1, 2 3 , .
:
Code:SELECT `id`, MATCH(`title`, `body`) AGAINST ('dumanekva' IN BOOLEAN MODE) AS `relevance` FROM `table` WHERE MATCH(`title`, `body`) AGAINST ('dumanekva' IN BOOLEAN MODE) ORDER BY `relevance` DESCCode:SELECT `id`, MATCH(`title`, `body`) AGAINST ('dumanekva') AS `relevance` FROM `table` WHERE MATCH(`title`, `body`) AGAINST ('dumanekva' IN BOOLEAN MODE) ORDER BY `relevance` DESC''? * *
- !
...
-
10th October 2010 17:00 #6
.
, ID- .
, , - , .
:
Query took 0.05 sec ( -, )Code:SELECT `id` FROM `table` WHERE MATCH(`title`, `body`) AGAINST ('dumanekva drugaduma oshteedna' IN BOOLEAN MODE) >= 2
" = 2", ~2 - e .
Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
10th October 2010 17:34 #7:Code:
FLUSH TABLE `table`; SELECT `id` FROM `table` WHERE MATCH(`title`, `body`) AGAINST ('dumanekva drugaduma oshteedna' IN BOOLEAN MODE) >= 2 AND WHERE MATCH(`title`, `body`) AGAINST ('dumanekva drugaduma oshteedna' IN BOOLEAN MODE) < 3
:Code:FLUSH TABLE `table`; SELECT `id` FROM `table` WHERE MATCH(`title`, `body`) AGAINST ('dumanekva drugaduma oshteedna' IN BOOLEAN MODE) = 2;
.Code:FLUSH TABLE `table`; SELECT `id` FROM `table` WHERE MATCH(`title`, `body`) AGAINST ('dumanekva drugaduma oshteedna' IN BOOLEAN MODE) = 2.0;
, .
---------- Post added at 17:34 ---------- Previous post was at 17:28 ----------
50% - , . .
''? * *
- !
...
-
10th October 2010 17:06 #8
. relevance MATCH...AGAINST, .
relevance = 1 . relevance - 1, , relevance=0 .
"=1"? . MySQL , - .
, -.
, , :
Code:FLUSH TABLE `tablename`;
''? * *
- !
...
-
10th October 2010 17:11 #9
, , .
3 2 title/body, "= 2", , ">= 2" . , 5 3, 3, , .
, ( ,
).
Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
10th October 2010 17:45 #10
1 - 0.0012
2 - 2.0723
3 - 2.0639
2 3 , flush .
... ..
ps - WHERE AND-a.
Edit:
-? , ?
phpmyadmin, flush .
Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
10th October 2010 18:12 #11
, phpmyadmin-a, , -.
, localhost.
:
.Code:FLUSH table `articles`; SELECT `id` FROM `articles` WHERE MATCH(`title`, `description`) AGAINST (' ' IN BOOLEAN MODE) = 2;
, fulltext , :
- 0.0118
>=2 - 0.0198
=2 - 0.0232
=3 - 0.0734
>=3 - 0.0734
:
- 0.0015
>= - 0.0019
=2 - 0.0225
=3 - 0.0738
>=3 - 0.0040
, "=" MySQL ! 10 - , "=" .
?
---------- Post added at 18:12 ---------- Previous post was at 18:06 ----------
, workaround-, ?
EDIT:>> - mysql 5.1.30''? * *
- !
...
-
10th October 2010 18:25 #12
, alter- .
( ) , .. .
, , .
, 20-30 .
load- 12, . A CPU usage-a MySQL- 360%.
, - 2 "="...
E, >= ( - like...
)
Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
10th October 2010 18:40 #13
-
10th October 2010 18:30 #14
- , 20 .
, "=" MySQL 10 - , , MATCH...AGAINST "<x+1" ">=x".
''? * *
- !
...
-
10th October 2010 18:34 #15
, , - .

10 , 1000 - .
Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
10th October 2010 22:59 #16
bugs.mysql.com, .
Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
11th October 2010 15:08 #17Registered User
Join Date: Jul:2005
Location: Sofiq
Posts: 2,798
HAVING ?
EXPLAIN ? ? myisam_sort_buffer_size key_buffer_size?Code:SELECT `id`, MATCH(`title`, `description`) AGAINST (' ' IN BOOLEAN MODE) as `match` FROM `articles` WHERE MATCH(`title`, `description`) AGAINST (' ' IN BOOLEAN MODE) HAVING `match` = 2
-
14th October 2010 23:49 #18
-
11th November 2010 12:15 #19
.
, .
.
score-, 2 , :
, - >5 .Code:SELECT objects.id, objects.title, objects.`body`, regions.name, MATCH (objects.title,objects.`body`,regions.name) AGAINST (' ' IN BOOLEAN MODE) AS score FROM objects LEFT JOIN regions ON objects.region = regions.id HAVING score >= 3 ORDER BY score DESC
, , objects region_ID, ( ). , , ( MATCH()):
, .Code:SELECT objects.id, objects.title, objects.`body`, MATCH (objects.title,objects.`body`,objects.region_name) AGAINST (' ' IN BOOLEAN MODE) AS score FROM objects HAVING score >= 3 ORDER BY score DESC
.. .Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
11th November 2010 13:08 #20
Match , . .
, :
.....
...
WHERE objects.region = X
JOIN.
P.S. - , .
''? * *
- !
...
-
11th November 2010 13:16 #21Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
12th November 2010 10:12 #22Registered User
Join Date: Jul:2005
Location: Sofiq
Posts: 2,798
A http://sphinxsearch.com/. - MyISAM full text search. , 100
Last edited by _ShadoW_; 12th November 2010 at 11:55.
-
12th November 2010 10:47 #23Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
27th December 2010 14:50 #24
.
, .Looks like index is not used with =2:
http://bugs.mysql.com/bug.php?id=57354Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
27th December 2010 17:11 #25




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in