Sphinx implementation
- or -
Post a project like this2518
$$$
- Posted:
- Proposals: 3
- Remote
- #1579250
- Awarded
Description
Experience Level: Expert
We have some slow queries that are becoming a problem. So far it has been fine because even when they take in some cases more than 15 minutes, it was fine because they are background process. But now our user base is growing and we are suffering too much delays.
Here is one example of this queries:
-----------------------------------------------
SELECT
p.id as post_id, u.id AS user_id
FROM
user AS u
INNER JOIN
post AS t ON u.id=t.user_id
LEFT JOIN (
SELECT user_id FROM f1 WHERE client_id=1 UNION
SELECT user_id FROM f2 WHERE client_id=1 UNION
SELECT user_id FROM action WHERE client_id=1 AND action="list" UNION
SELECT user_id FROM evolution WHERE client_id=1
) T on u.id = T.user_id
WHERE
T.user_id IS NULL AND u.zombie=0 AND u.quality>=18 AND (
t.text LIKE '% #pieds%' OR t.text LIKE '% #footfetish%' OR t.text LIKE '% #F�tichiste%' OR t.text LIKE '% #fetish%' OR t.text LIKE '% #f�tichisme%'
) AND t.lang ='fr'
ORDER BY
u.quality DESC
LIMIT
0,5000
-----------------------------------------------
Table user has about 600 millions entries, f1 and f2, action and evolution also have millions and post also hundreds of millions. The current DB is MySQL, so I have been researching a little and it looks like Sphinx Search could be a great solution without changing too much our current architecture (what is killing us, is the "LIKE" conditions).
I would like to speed up the implementation of this solution, so I would like to have a quote from you for such task. Feel free to ask me any additional info that you may have.
Here is one example of this queries:
-----------------------------------------------
SELECT
p.id as post_id, u.id AS user_id
FROM
user AS u
INNER JOIN
post AS t ON u.id=t.user_id
LEFT JOIN (
SELECT user_id FROM f1 WHERE client_id=1 UNION
SELECT user_id FROM f2 WHERE client_id=1 UNION
SELECT user_id FROM action WHERE client_id=1 AND action="list" UNION
SELECT user_id FROM evolution WHERE client_id=1
) T on u.id = T.user_id
WHERE
T.user_id IS NULL AND u.zombie=0 AND u.quality>=18 AND (
t.text LIKE '% #pieds%' OR t.text LIKE '% #footfetish%' OR t.text LIKE '% #F�tichiste%' OR t.text LIKE '% #fetish%' OR t.text LIKE '% #f�tichisme%'
) AND t.lang ='fr'
ORDER BY
u.quality DESC
LIMIT
0,5000
-----------------------------------------------
Table user has about 600 millions entries, f1 and f2, action and evolution also have millions and post also hundreds of millions. The current DB is MySQL, so I have been researching a little and it looks like Sphinx Search could be a great solution without changing too much our current architecture (what is killing us, is the "LIKE" conditions).
I would like to speed up the implementation of this solution, so I would like to have a quote from you for such task. Feel free to ask me any additional info that you may have.
Bartolome R.
100% (7)Projects Completed
2
Freelancers worked with
2
Projects awarded
67%
Last project
6 Jun 2017
Panama
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies