:) yes no problem 2014-09-04 13:47 GMT-03:00 Sergei Golubchik <serg@mariadb.org>:
Hi, Roberto!
On Aug 12, Roberto Spadim wrote:
guys, i have some queries like this: SELECT doc_hash_key FROM mov_documentos WHERE doc_hash_key LIKE "j;1;$;294007/3nfe-1%" UNION SELECT doc_hash_key FROM mov_documentos WHERE doc_hash_key LIKE "j;1;%;294007/3nfe-1%" UNION SELECT doc_hash_key FROM mov_documentos WHERE doc_hash_key LIKE "j;1;%;%294007/3nfe-1%" UNION SELECT doc_hash_key FROM mov_documentos WHERE doc_hash_key LIKE "%;%;$;%294007/3nfe-1%" UNION SELECT doc_hash_key FROM mov_documentos WHERE doc_hash_key LIKE "%;%;%;294007/3nfe-1%" UNION SELECT doc_hash_key FROM mov_documentos WHERE doc_hash_key LIKE "%;%;%;%294007/3nfe-1%" LIMIT 1
it's a search about a document number, but the problem is.... the first query at first line (with % at end of the query) return really fast, but executing others queries are very slow, the question is could we optimize this kind of query, since limit=1 row?
Sounds very reasonable. And, I hope, not too difficult to implement. Could you please put this in Jira?
Regards, Sergei
-- Roberto Spadim SPAEmpresarial Eng. Automação e Controle