Commit 2364d12d authored by Ivan Tyagov's avatar Ivan Tyagov

Optimize SQL query to use full text search (i.e. index) in order to find...

Optimize SQL query to use full text search (i.e. index) in order to find related documents (i.e. referencing documents) rather than like (which scan all table rows).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28548 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a09f7a84
......@@ -125,7 +125,7 @@ FROM\n
AND <dtml-var "query[\'where_expression\']">\n
</dtml-if>\n
AND\n
<dtml-sqltest "\'%\'+str(reference)+\'%\'" column=SearchableText op=like type=string>\n
MATCH(SearchableText) AGAINST(<dtml-sqlvar reference type=string>)\n
AND\n
<dtml-sqltest reference op=ne type=string>\n
ORDER BY reference, language_order DESC, version DESC, revision DESC\n
......@@ -211,7 +211,7 @@ FROM\n
AND <dtml-var "query[\'where_expression\']">\n
</dtml-if>\n
AND\n
<dtml-sqltest "\'%\'+str(reference)+\'%\'" column=SearchableText op=like type=string>\n
MATCH(SearchableText) AGAINST(<dtml-sqlvar reference type=string>)\n
AND\n
<dtml-sqltest reference op=ne type=string>\n
ORDER BY reference, language_order DESC, version DESC, revision DESC\n
......
2009-08-21 ivan
* Use full text search to find related documents (i.e. referencing documents)
2009-08-12 Kazuhiko
* use iframe_content in OOoDocument_viewAsWeb for Drawing and Presentation to have better paginations.
* use OOoDocument_viewAsWeb instead of Drawing_viewAsWeb in all preview for Drawing and Presentation.
......
1008
\ No newline at end of file
1009
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment